Well, don't write the SQL yourself of course, something like

$user_story_conditions = array(
  'city_id' => $Session->read('logged_in_user_city_id')
);
$user_stories = $this->Story->findAll( array('Story'=>
$user_story_conditions) );

would be better.

For rating, the only thing that springs to mind is RosSoft's ajax
rating helper ( http://rossoft.wordpress.com/2006/09/07/ajax-star-rating-helper/
).


inVINCable wrote:

> That is exactly what I need to do. I want the threads selected and
> shown based upon the user's details (the user_city_id that corresponds
> to a city). So let's say I live in New York, the database will query
> for stories in New York and display them on my home page.
>
> I guess since this won't put to much stress on my server, I am going
> to go ahead and implement it today. I am just going to make a default
> view file, and write the queries for the database using things like
> (SELECT * FROM WHERE city_id=user_city_id) That way, the user gets
> only stories pertaining to his city.
>
>
> Thanks for all your help.
>
> P.S. Off topic but does anyone have any resources/ideas on designing
> an algorithm for rating? Thanks.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to