[UPHPU] MySQL query problem

MilesTogoe miles.togoe at gmail.com
Sat Dec 22 18:50:39 MST 2007


Justin Giboney wrote:
> Is there something wrong with this? cause it doesn't order the movies.
>
> see 
> http://www.forodeherbales.com/edge/singleperson.php?personid=519&sort=new
>
> // set the sql statement
> $sqlwhere = '';
> for ($i=0;$i < count($ratingsarray);$i++){
>    $sqlwhere = $sqlwhere . ' AND Rating_ID != ' . $ratingsarray[$i];
> }
> $order = 'Movies.Movie_Release_Year DESC';
>
> $sql = "SELECT Movie_Title, Movies.Movie_ID, Front_Image_File FROM 
> Movies, Actor_Movie_Relationships, Rating_Movie_Relationships WHERE 
> Movies.Movie_ID = Actor_Movie_Relationships.Movie_ID AND 
> Movies.Movie_ID = Rating_Movie_Relationships.Movie_ID AND Actor_ID = 
> ('$personid') $sqlwhere ORDER BY $order"
I think you need  "where $sqlwhere"




More information about the UPHPU mailing list