Hello , i have small problem with mysql 5 (with mysql 4 no problemos)...: [Tue Feb 07 10:01:42 2006] [error] [client 10.0.1.5] DBD::mysql::st execute fail ed: Unknown column 'biblio.biblionumber' in 'on clause' at /opt/koha224_cide/int ranet/modules/C4/SearchMarc.pm line 392., referer: http://212.14.16.131:8002/cgi -bin/koha/search.marc/search.pl?type=intranet [Tue Feb 07 10:01:42 2006] [error] [client 10.0.1.5] DBD::mysql::st fetchrow_has href failed: fetch() without execute() at /opt/koha224_cide/intranet/modules/C4/ SearchMarc.pm line 394., referer: http://212.14.16.131:8002/cgi-bin/koha/search. marc/search.pl?type=intranet any idea why is problem with "ON" ?:> bye -- <wojciech@zatorski.net> tel. +48 509-855-239; GG: 1500861; Skype: zatorski http://www.Zatorski.Net -- I know not with what weapons World War III will be fought, but World War IV will be fought with sticks and stones. -- Albert Einstein
Hello Wojciech, Tuesday, February 7, 2006, 4:31:23 PM, you wrote: ok this is KOHA problem: http://bugs.mysql.com/bug.php?id=14047 Yes, this is new, but correct behaviour ob 5.0.12 and newer versions. It is documented (http://dev.mysql.com/doc/refman/5.0/en/join.html): "This means that some queries that appeared to work correctly prior to 5.0.12 must be rewritten to comply with the standard. For example, a query of the form SELECT t1.id,t2.id,t3.id FROM t1,t2 LEFT JOIN t3 ON (t3.id=t1.id) WHERE t1.id=t2.id; will be interpreted in MySQL 5.0.12 and later as SELECT t1.id,t2.id,t3.id FROM t1,( t2 LEFT JOIN t3 ON (t3.id=t1.id) ) WHERE t1.id=t2.id; Such a query must now be written like so: SELECT t1.id,t2.id,t3.id FROM (t1,t2) LEFT JOIN t3 ON (t3.id=t1.id) WHERE t1.id=t2.id;" -- <wojciech@zatorski.net> tel. +48 509-855-239; GG: 1500861; Skype: zatorski http://www.Zatorski.Net -- You cannot kill time without injuring eternity. -- Thoreau
bad: $query="select *,biblio.author,biblio.biblionumber from biblio left join additionalauthors on additionalauthors.biblionumber =biblio.biblionumber where ((biblio.author like ? or biblio.author like ? or additionalauthors.author like ? or additionalauthors.author like ? )"; good: $query="select *,biblio.author,biblio.biblionumber from biblio left join additionalauthors on (additionalauthors.biblionumber =biblio.biblionumber) where ((biblio.author like ? or biblio.author like ? or additionalauthors.author like ? or additionalauthors.author like ? )"; and now mysql 5 supported;) -- <wojciech@zatorski.net> tel. +48 509-855-239; GG: 1500861; Skype: zatorski http://www.Zatorski.Net -- "Genius always gives its best at first, prudence at last." -- Lavater, J.C.
Wojciech Zatorski a écrit :
bad:
$query="select *,biblio.author,biblio.biblionumber from biblio left join additionalauthors on additionalauthors.biblionumber =biblio.biblionumber where ((biblio.author like ? or biblio.author like ? or additionalauthors.author like ? or additionalauthors.author like ? )";
good:
$query="select *,biblio.author,biblio.biblionumber from biblio left join additionalauthors on (additionalauthors.biblionumber =biblio.biblionumber) where ((biblio.author like ? or biblio.author like ? or additionalauthors.author like ? or additionalauthors.author like ? )";
and now mysql 5 supported;)
would have been more helpful if you had given page to bugfix. :) Thx. Friendly. -- Henri-Damien LAURENT
participants (2)
-
Henri-Damien LAURENT -
Wojciech Zatorski