Jump to content

Join Query (List Only)


justlukeyou

Recommended Posts

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)) {
?>	

Link to comment
https://forums.phpfreaks.com/topic/274127-join-query-list-only/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.