jeff5656 Posted October 29, 2009 Share Posted October 29, 2009 Very basic question to all you, but I am new to using Joins. How do I put in WHERE todo.signoff_status = 'a' $consultsq3 = "SELECT * FROM ild INNER JOIN to ON icu.id_incr = todo.pt_id AND icu.id_incr = ' " . $row['id_incr'] . " ' order by todo.todo_date"; Thanks and sorry for this easy question :-) Link to comment https://forums.phpfreaks.com/topic/179526-how-do-i-put-a-where-statement-in-with-a-join/ Share on other sites More sharing options...
Mchl Posted October 29, 2009 Share Posted October 29, 2009 After ON conditions and before ORDER BY BTW: 'to' is MySQL's reserved word and should not be used as table name Link to comment https://forums.phpfreaks.com/topic/179526-how-do-i-put-a-where-statement-in-with-a-join/#findComment-947291 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.