Mysql 4 vs 5: select Problem
am 25.11.2006 13:38:33 von Henriette KressHallo,
ich versuche eine select von Mysql 4.0.15-Max (suse 9.1) auf Mysql 5.0.18 (suse
10.1) zum Laufen zu bringen:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 780 to server version: 5.0.18
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> SELECT distinct
-> dirs.directory as direc,
-> dirs.directory_name as longdir,
-> dirs.directory_short as shortdir,
-> urls.page_name_html as phtml,
-> urls.page_name as pname,
-> ulid.major as urlmain,
-> bookm.bookm_url as bkmurl,
-> bookm.bookm_header as bkmhead
-> FROM pl_urls as urls,
-> uid_lid as ulid,
-> pl_dir as dirs
-> LEFT JOIN pl_bookm as bookm
-> ON bookm.bid = ulid.bid
-> WHERE ulid.lid = 12774
-> AND dirs.did = urls.did
-> AND ulid.uid = urls.uid
-> ORDER BY dirs.did,
-> ulid.major DESC;
ERROR 1054 (42S22): Unknown column 'ulid.bid' in 'on clause'
mysql>
Unter Mysql 4.0.15-Max und unter Mysql 4.1.16 (Debian) funktioniert das ohne
Probleme.
Das MYSQL Manual (http://dev.mysql.com/doc/refman/5.0/en/select.html) hilft da
gar nicht weiter.
Google sagt:
"This is a known bug in mysql 5. The work around is to specify t1 join t2
instead of using the , (comma).!"
http://www.delphifaq.com/faq/databases/mysql/f1110.shtml
Mann oh mann, das wird ein massiver Join. Gibt es andere Lösungen?
Vielen Dank,
Henriette