hi everyone, i'm having a trouble in running SQL subqueries in Linux. it works fine in Windows XP but not in Linux Suse 9.x. i use PHP4.X.X and MySQL 4.X.X in both platforms. even the simplest command: select a.col_id, (select count(*) from tbl2 b where b.col_id = a.col_id) from tbl1 a where a.date >= '2007-06-01 and a.date <= '2007-06-10'; i'm just a beginner..please help.. thanks in advance... regards, -hayunna
Which version of MySQL are you running on the Linux box? Subqueries are a relatively new thing and not all versions of MySQL 4 support them. If you can, I'd recommend upgrading to MySQL 5.
it gives me an error that i have an SQL syntax, tho' i know it's correct, because it works for windows. i've just read when i googled about this problem that subqueries, such as the one i've mentioned, is not supported with MySQL 4.0, which we are running in our web server. i am still considering upgrade from PHP 4 to PHP 5 and MySQL 4 to MySQL 5. but the problem is, i'm not used with Linux scripting. i don't know how to install something or upgrade the package/version of an existing software. i'm afraid that i might destroy our web server if i do some experimentations on it. perhaps i'll do a deeper research on how to do all these stuff. can you help me with this? thanks.