AKalair Posted September 5, 2009 Share Posted September 5, 2009 Hi, When I display the results from this query the title and tagline changes but the image displayed is always the same despite having different images stored in the database. $getlateststories = mysql_query("SELECT * FROM reviews, news ORDER BY 'creationdate' LIMIT 0, 2 ") or trigger_error('Unable to get latest stories', E_USER_ERROR); while($Results = mysql_fetch_array($getlateststories)) { echo "<p class=Headings> <a href=/viewnewsstory.php?newsid=$Results[newsid]&catid=$Results[categoryid]>$Results[newstitle] </p></a> <img src=$Results[imageurl]> <br> <p class=Sub_Headings>$Results[newstagline]</p><br><br> "; echo "<p class=Headings> <a href=/viewreviews.php?reviewid=$Results[reviewid]&catid=$Results[categoryid]>$Results[reviewtitle] </p></a> <img src=$Results[imageurl]> <p class=Sub_Headings>$Results[reviewtagline] </p><br><br> "; } Any ideas? Thanks Link to comment https://forums.phpfreaks.com/topic/173219-problem-displaying-results-from-query/ Share on other sites More sharing options...
fenway Posted September 8, 2009 Share Posted September 8, 2009 Yikes... where's the join condition. Link to comment https://forums.phpfreaks.com/topic/173219-problem-displaying-results-from-query/#findComment-915025 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.