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
join query sytax
Complete full-featured tool for preview and download of SQL reports in your Joomla site.
Forum rules
This forum is not for any support questions/issues/features. Please use Support Center for such requests.
This forum is not for any support questions/issues/features. Please use Support Center for such requests.
-
- Posts: 2
- Joined: April 20th, 2014, 10:02 pm
- Name: Pamela
- Admin
- Site Admin
- Posts: 1078
- Joined: October 21st, 2008, 6:39 pm
- Name: Administrator
- Browser: Chrome
Re: join query sytax
Don't use dots in table aliases:
Code: Select all
SELECT * FROM `#__osmembership_subscribers` AS table1
JOIN '#__osmembership_plans' AS table2
ON table1.`plan_id` = table2.`id`;
WHERE DATE_SUB(CURDATE(),INTERVAL 90 DAY) <= `from_date`;
-
- Posts: 2
- Joined: April 20th, 2014, 10:02 pm
- Name: Pamela
- Admin
- Site Admin
- Posts: 1078
- Joined: October 21st, 2008, 6:39 pm
- Name: Administrator
- Browser: Chrome
Re: join query sytax
Please contact Support Center and inform Joomla super user login details:
https://alterbrains.zendesk.com/login
https://alterbrains.zendesk.com/login
Jump to
- Joomla Extensions
- ↳ p8pBB bridge
- ↳ Community Builder
- ↳ JomSocial
- ↳ AlphaUserPoints
- ↳ Xmap
- ↳ Styles
- ↳ MODs
- ↳ MightySites
- ↳ Alter Reports
- ↳ Alter Glossary
- ↳ Alter Surveys
- ↳ Alter Articles
- ↳ Alter Optimizer
- ↳ Alter Fields
- ↳ Alter Tags
- ↳ Direct Alias
- ↳ AJAX toggler
- ↳ p8pBB comments
- ↳ Modulation
- ↳ GSearch
- Related discussions
- ↳ Joomla extensions
- ↳ Joomla templates and styles
- ↳ Coding
- ↳ Test Forum
- AlterBrains website
- ↳ News
- Board index
- All times are UTC-05:00
- Delete cookies
- Contact us