Jump to content

SELECT is breaking somewhere


anevins

Recommended Posts

This select statement works fine:

SELECT make, colour, street, town, city, date FROM location, stick, report

WHERE report.rid = stick.sid

AND stick.missingLocation = location.lid

 

But I want to add another table,

this select statement breaks:

SELECT make, colour, street, town, city, date, image_url, image_width, image_height FROM location, stick, report, identification

WHERE report.rid = stick.sid

AND stick.missingLocation = location.lid

AND identification.stickID = stick.sid

 

Structure for table 'identification':

|------

|Field|Type|Null|Default

|------

|//**id**//|int(11)|No|

|image_url|char(220)|No|

|image_width|char(220)|No|

|image_height|char(220)|No|

|image_type|enum('jpeg', 'pjpeg', 'png', 'gif')|No|

|stickID|int(11)|Yes|NULL

 

Link to comment
https://forums.phpfreaks.com/topic/230419-select-is-breaking-somewhere/
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.