[Koha-devel] MySQL specific queries

Paul POULAIN paul.poulain at free.fr
Thu Apr 6 10:04:45 CEST 2006


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)





More information about the Koha-devel mailing list