join query sytax
Posted: August 19th, 2014, 8:53 pm
I am having trouble with the syntax to join 2 tables.
SELECT * FROM `#__osmembership_subscribers` as table.1
JOIN '#__osmembership_plans' as table.2
ON table.1`plan_id`=table.2`id`;
WHERE DATE_SUB(CURDATE(),INTERVAL 90 DAY) <= `from_date`;
this is the error message, but i am not sure what it means? can anyone help?
Error in query!
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 '.1 JOIN '#__osmembership_plans' as table.2 ON table.1`plan_id`=table.2`id`; WHER' at line 1 SQL=SELECT * FROM `nsqt_osmembership_subscribers` as table.1 JOIN '#__osmembership_plans' as table.2 ON table.1`plan_id`=table.2`id`; WHERE DATE_SUB(CURDATE(),INTERVAL 90 DAY) <= `from_date`;
Error in query!
SQL error: 1064
thankyou
SELECT * FROM `#__osmembership_subscribers` as table.1
JOIN '#__osmembership_plans' as table.2
ON table.1`plan_id`=table.2`id`;
WHERE DATE_SUB(CURDATE(),INTERVAL 90 DAY) <= `from_date`;
this is the error message, but i am not sure what it means? can anyone help?
Error in query!
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 '.1 JOIN '#__osmembership_plans' as table.2 ON table.1`plan_id`=table.2`id`; WHER' at line 1 SQL=SELECT * FROM `nsqt_osmembership_subscribers` as table.1 JOIN '#__osmembership_plans' as table.2 ON table.1`plan_id`=table.2`id`; WHERE DATE_SUB(CURDATE(),INTERVAL 90 DAY) <= `from_date`;
Error in query!
SQL error: 1064
thankyou