Jump to content

[SOLVED] Tricky Query 2


Link

Recommended Posts

SELECT users.id, users.first_name, users.last_name, guides.mit_id
FROM guides, schedules_private AS sch 
LEFT JOIN users 
ON guides.user_id = users.id 
WHERE  sch.user_id = users.id 
AND (
   (sch.week = '2009-06-29' AND sch.day >= '3')
OR (
     sch.week > '2009-06-29' AND sch.week <= '2010-06-28' AND sch.day <= '3'
)
)

 

 

Why is this giving me u.id is an unknown column?

Link to comment
https://forums.phpfreaks.com/topic/165550-solved-tricky-query-2/
Share on other sites

SELECT users.id, users.first_name, users.last_name, guides.mit_id
FROM guides, schedules_private AS sch 
LEFT JOIN users 
ON guides.user_id = users.id 
WHERE  sch.user_id = users.id 
AND (  ///    (sch.week = '2009-06-29' AND sch.day >= '3')
OR (
     sch.week > '2009-06-29' AND sch.week )
)

 

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.