View Single Post
  #1 (permalink)  
Old March 9th, 2007, 05:44 AM
derrida derrida is offline
Authorized User
Join Date: Jul 2006
Location: Bat-yam, , Israel.
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default problems with the reviews table in chapter 4

i`m working on chapter 4 and all worked fine untill i made the reviews section. actually it works to exept the number of reviews per movie: it shows only 1 review.

so if i understand the problem is with the sql query, this is what i have and its the same in the book:

$review_query = "SELECT * FROM reviews " .
                "WHERE review_movie_id ='" . $_GET['movie_id'] . "' " .
                "ORDER BY review_date DESC";

now, the movie_id does pass through the get method, so i think that maybe the problem is with the reviews table. when we build it there is no "movie_id" as a forighn key, so there is no connection between the tables.
am i right? and if not can someone please help? cause i`m trying to figure it for some hours now.

best regards

Reply With Quote