proctk Posted February 21, 2008 Share Posted February 21, 2008 SQL Error: SELECT buddylink.buddy_id, buddylink.owner_id, privacy.email_birthday, privacy.user_id, buddylink.mailyear, FROM buddylink LEFT JOIN privacy ON buddylink.owner_id = privacy.user_id WHERE buddylink.status = '2' AND buddylink.mailyear != YEAR(CURDATE()) AND privacy.email_birthday = '0' You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM buddylink LEFT JOIN privacy ON buddylink.owner_id = privacy.user_id WHERE b' at line 1 Quote Link to comment Share on other sites More sharing options...
proctk Posted February 21, 2008 Author Share Posted February 21, 2008 any idea where the error is Quote Link to comment Share on other sites More sharing options...
bpops Posted February 21, 2008 Share Posted February 21, 2008 'buddylink.mailyear,' do you need that comma there? Quote Link to comment Share on other sites More sharing options...
proctk Posted February 21, 2008 Author Share Posted February 21, 2008 thanks I was going blind looking Quote Link to comment Share on other sites More sharing options...
proctk Posted February 21, 2008 Author Share Posted February 21, 2008 Hi I have been staring at this one for a while to. Any ideas whats wrong SQL Error: SELECT * (DAYOFYEAR(CURDATE()+INTERVAL 15 day) - DAYOFYEAR(DOB)) AS diff FROM users HAVING diff BETWEEN 1 AND 15 AND user_id = '63' You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(DAYOFYEAR(CURDATE()+INTERVAL 15 day) - DAYOFYEAR(DOB)) AS diff FROM users HAVIN' at line 1 Quote Link to comment Share on other sites More sharing options...
revraz Posted February 21, 2008 Share Posted February 21, 2008 This is wrong SELECT * (DAYOFYEAR(CURDATE()+INTERVAL 15 day) - DAYOFYEAR(DOB)) What are you trying to select? Quote Link to comment Share on other sites More sharing options...
proctk Posted February 21, 2008 Author Share Posted February 21, 2008 Get all entries from the table who has a birthday within 15 days. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.