|
From: | Paul POULAIN |
Subject: | Re: [Koha-devel] MySQL specific queries |
Date: | Thu, 06 Apr 2006 10:04:45 +0200 |
User-agent: | Mozilla Thunderbird 1.0.6-7.5.20060mdk (X11/20050322) |
Pierrick LE GALL a écrit :
Hi koha-devel, Working in admin/stopwords.pl, I've found an SQL query I didn't know : "REPLACE stopwords (word) values (?)". I've searched in my MySQL cookbook and found what was the purpose of this statement (it's great by the way, too bad I didn't know it, it would have saved me many code lines). What the cookbook also told me is that "INSERT IGNORE" and "REPLACE" are MySQL specific statement. Maybe we already use "SELECT ... LIMIT X,Y" but this one is much more difficult to /translate/ into standard SQL. What is the official coding guideline concerning SQL queries? Can we use such specific statements?
You're right we should not. I'm the main responsible of this error, I beg your pardon !
That's the main reason why we say we are mySQL compliant only for instance. Hopefully, "replace" should be only found in /admin/ directory.They was the 1st scripts I did for Koha & in Perl, when starting to be involved in Koha, in 2002,january. I agree they are really poor (Perl as well as mySQL. But they work correctly...)
-- Paul POULAIN et Henri Damien LAURENT Consultants indépendants en logiciels libres et bibliothéconomie (http://www.koha-fr.org)
[Prev in Thread] | Current Thread | [Next in Thread] |