pundabuyer Posted May 7, 2013 Share Posted May 7, 2013 Hi All, Wondering if anyone could help with my issus. I have written some SQL below to get a bit of data out of the database but having strange results. I have requested all data from all tables with 2 simple left joins. The tables and data types are fine and all match and the query runs. but when i output the results all i get is the full 'requests' table and no associated data from the other tables. There is definately data that corresponds in the other 2. also i get the entire requests table even if i only request one field from it... whats going on! "SELECT requests.*, users.*, areas.* FROM (requests LEFT JOIN users ON requests.requesterID = users.userid) LEFT JOIN areas ON requests.areaID = areas.areaID" thanks in advance, A Link to comment https://forums.phpfreaks.com/topic/277746-mysqli_query-help/ Share on other sites More sharing options...
DarkKnight2011 Posted May 7, 2013 Share Posted May 7, 2013 SELECT requests.*, users.*, areas.* FROM requests LEFT JOIN users ON requests.requesterID = users.userid LEFT JOIN areas ON requests.areaID = areas.areaID try that, you had brackets in there which weren't needed Link to comment https://forums.phpfreaks.com/topic/277746-mysqli_query-help/#findComment-1428851 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.