If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
error in your SQL syntax near 'SELECT ... (was "Basic MySQl Command")
Hi,
Im new to Mysql but have been used to using SQL syntax for SQL server. I have a problem trying to run the following code. The code is included with the error.
Error
SQL-query :
SELECT p.id, p.name
FROM partners p
WHERE p.id
IN (
SELECT partner_id AS id
FROM partner_area
WHERE area_id = 10
)
LIMIT 0 , 30
MySQL said:
You have an error in your SQL syntax near 'SELECT partner_id AS id
FROM partner_area
WHERE area_id = 10 ) LIMIT 0, 30' at line 5
Im sure this is a basic solution but cant get my head around it at the moment.
I dont understand the error as I have run the code inside the inner select and it works find. Can anyone tell me where the error points to.
I am running this code within a control panel of a web hosting site to test on the database. I want to then apply this code to my site.