justlukeyou Posted February 6, 2013 Share Posted February 6, 2013 Hi, The people on here were tremendously helpful in sorting out a join query which featured a query from the domain name. However I am now only trying to echo a list from the database but it also echos the same result multiple times. $query = mysql_query("SELECT eventname, firstname, eventdetails, eventlocation, eventcountry, eventid, eventstart, eventend, logo, company, id, supplierdetails1, eventid FROM users JOIN eventjobs ORDER BY eventid DESC LIMIT 8 "); I can get this to work (thanks to peoples help on here) but I cant get the above join to work which should be simpler! <?php $query = mysql_query("SELECT eventname, firstname, eventdetails, eventlocation, eventcountry, eventid, eventstart, eventend, logo, company, id FROM users JOIN eventjobs ON eventjobs.organiserid = users.id WHERE eventjobs.eventid = $eventid LIMIT 10 "); while($row = mysql_fetch_array($query)) { ?> Quote Link to comment https://forums.phpfreaks.com/topic/274127-join-query-list-only/ Share on other sites More sharing options...
DavidAM Posted February 6, 2013 Share Posted February 6, 2013 FROM users JOIN eventjobs FROM users JOIN eventjobs ON eventjobs.organiserid = users.id See the difference? Quote Link to comment https://forums.phpfreaks.com/topic/274127-join-query-list-only/#findComment-1410593 Share on other sites More sharing options...
justlukeyou Posted February 7, 2013 Author Share Posted February 7, 2013 Thanks mate. Quote Link to comment https://forums.phpfreaks.com/topic/274127-join-query-list-only/#findComment-1410812 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.