skiplogic Posted September 10, 2006 Share Posted September 10, 2006 I am tearing my hair out! Any help would be appreciated!Here's some valid SQL that wont run on my local (osx) install of mysql 5:yo-mamas-Computer:~/buthu/linkback bryan$ mysql -Vmysql Ver 14.12 Distrib 5.0.24a, for apple-darwin8.6.0 (powerpc) using readline 5.0yo-mamas-Computer:~/buthu/linkback bryan$ mysql testReading table information for completion of table and column namesYou can turn off this feature to get a quicker startup with -AWelcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 38 to server version: 4.0.24-standardType 'help;' or '\h' for help. Type '\c' to clear the buffer.<b>mysql> select 1 from (select 1 from dual) b;ERROR 1064 (00000): 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 'select 1 from dual) b' at line 1</b>But it works on the BSD box, which is apparently running an older version of mysql-bash-2.05b$ mysql -Vmysql Ver 14.7 Distrib 4.1.19, for portbld-freebsd5.4 (i386) using 4.3-bash-2.05b$ brydevEnter password: Reading table information for completion of table and column namesYou can turn off this feature to get a quicker startup with -AWelcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 793946 to server version: 5.0.22Type 'help;' or '\h' for help. Type '\c' to clear the buffer.<b>mysql> select 1 from (select 1 from dual) b;+---+| 1 |+---+| 1 |+---+1 row in set (0.01 sec)</b>What gives? Link to comment https://forums.phpfreaks.com/topic/20325-subqueries/ Share on other sites More sharing options...
skiplogic Posted September 10, 2006 Author Share Posted September 10, 2006 i got it, nevermind... Link to comment https://forums.phpfreaks.com/topic/20325-subqueries/#findComment-89533 Share on other sites More sharing options...
fenway Posted September 11, 2006 Share Posted September 11, 2006 How? Link to comment https://forums.phpfreaks.com/topic/20325-subqueries/#findComment-89792 Share on other sites More sharing options...
skiplogic Posted September 11, 2006 Author Share Posted September 11, 2006 [quote author=fenway link=topic=107577.msg432076#msg432076 date=1157983462]How?[/quote]mysql -V prints the version of the client software, not the version. If you look at the login messages from each of the spools that I quoted above, you'll notice that the bsd box is running v 5, while the osx is running v 4. I guess subqueries weren't added until after 4... Link to comment https://forums.phpfreaks.com/topic/20325-subqueries/#findComment-89826 Share on other sites More sharing options...
fenway Posted September 11, 2006 Share Posted September 11, 2006 Ah yes, I see that now... version 4.0.24; subquery support was added in 4.1+. Link to comment https://forums.phpfreaks.com/topic/20325-subqueries/#findComment-89908 Share on other sites More sharing options...
skiplogic Posted September 11, 2006 Author Share Posted September 11, 2006 the dual table wasn't added by default until after version 4 either. I thought since I could select off of it the server version must have been 5 on the osx box, but I must have created it some time ago, heh. Link to comment https://forums.phpfreaks.com/topic/20325-subqueries/#findComment-89911 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.