Mortenjan Posted February 17, 2009 Author Share Posted February 17, 2009 Worked perfectly! Thanks you very much mjdamato! Regards Morten To get the results to populate the date/times in the proper order add the date to the ORDER clause in the query: $query="SELECT movies.id, movies.name, movies.age_limit, movies.length_time, movies.filmweb, movies.picture, date.id AS date_id, date, time.id AS time_id, time FROM movies JOIN date ON movies.id = date.movie_id JOIN time ON date.id = time.date_id ORDER BY movies.name, date"; For the date issue, I left off a couple lines. Replace the WHILE loop with this code while($movie = mysql_fetch_assoc($result)) { //Check for new movie if ($current_film_name != $movie['name']) { //New movie if($current_film_name != "") { //If not the first record, display the last movie displayMovie($m_name, $m_image, $m_age_limit, $m_length, $m_web, $m_dates, $m_times); } $current_film_name = $movie['name']; $m_name = $movie['name']; $m_image = $movie['picture']; $m_age_limit = $movie['age_limit']; $m_length = $movie['length_time']; $m_web = $movie['filmweb']; $m_dates = ""; $m_times = ""; $current_film_date = ""; } //Date/time data if ($current_film_date != $movie['date']) { //Different date from last record, show it $current_film_date = $movie['date']; $m_dates .= "{$movie['date']}<br>"; } else { //Same date as last, line break $m_dates .= "<br>"; } //Time date $m_times .= "{$movie['time']}<br>"; } That should take care of it Quote Link to comment Share on other sites More sharing options...
Mortenjan Posted February 18, 2009 Author Share Posted February 18, 2009 If im in the admin panel uses the same script. How do i add a delete button on the right side of all times? (Each date and movie too, but ill consentrate on the times first.) Any help would be much appreciated. Regards Morten Quote Link to comment Share on other sites More sharing options...
Psycho Posted February 18, 2009 Share Posted February 18, 2009 This should be posted as a new topic Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.