well it is quite strange, but when trying to execute any query with subquery i get parsing error (1064), no matter that i tried in phpmyadmin (could have been something related to that app.) and inside php code; i also tried in diferent hosts ( diferent MySQL installations)
well i tried a basic example of scalar subquery,from MySQL online doc, 13.1.8.1 section ( i have also tried with row subqueries ...) :
CREATE TABLE t1 (s1 INT);
INSERT INTO t1 VALUES (1);
CREATE TABLE t2 (s1 INT);
INSERT INTO t2 VALUES (2);
and then :
SELECT (SELECT s1 FROM t2) FROM t1;
so, then, mysql returns:
"
SELECT (
SELECT s1
FROM t2
)
FROM t1
LIMIT 0 , 30
MySQL said:
#1064 - You have an error in your SQL syntax near 'SELECT s1
FROM t2 )
FROM t1 LIMIT 0, 30' at line 2
"
well i have tried typing each char, also putting diferent quotes to fields,
and nothing; the inner query executed itself works perfectly, as well; so,
how is it possible to have a parsing error there ?;
do tables need any specific configuration?
thanks in advance for any answer ...