Fix: request specific to mysql works with mysqli

This commit is contained in:
Laurent Destailleur 2012-02-10 13:02:42 +01:00
parent 07859f1cda
commit 170faa363d
2 changed files with 8 additions and 4 deletions

View File

@ -140,12 +140,13 @@ function run_sql($sqlfile,$silent=1,$entity='',$usesavepoint=1,$handler='')
// restrict on database type
if (! empty($reg[1]))
{
if (strtolower($reg[1]) != $db->type) $qualified=0;
if (! preg_match('/'.preg_quote($reg[1]).'/i',$db->type)) $qualified=0;
}
// restrict on version
if ($qualified)
{
$versionrequest=explode('.',$reg[2]);
//print var_dump($versionrequest);
//print var_dump($versionarray);

View File

@ -12,9 +12,8 @@
-- To restrict request to Pgsql version x.y use -- VPGSQLx.y
-- --V4.1 DELETE FROM llx_product_fournisseur WHERE fk_product NOT IN (SELECT rowid from llx_product);
-- --VPGSQL8.2 DELETE FROM llx_usergroup_user WHERE fk_user NOT IN (SELECT rowid from llx_user);
-- --VMYSQL4.1 DELETE FROM llx_usergroup_user WHERE fk_usergroup NOT IN (SELECT rowid from llx_usergroup);
-- -- VPGSQL8.2 DELETE FROM llx_usergroup_user WHERE fk_user NOT IN (SELECT rowid from llx_user);
-- -- VMYSQL4.1 DELETE FROM llx_usergroup_user WHERE fk_usergroup NOT IN (SELECT rowid from llx_usergroup);
ALTER TABLE llx_extrafields ADD COLUMN TYPE VARCHAR(8);
@ -185,6 +184,10 @@ insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays
ALTER TABLE llx_paiement ADD COLUMN entity integer DEFAULT 1 NOT NULL AFTER rowid;
-- VMYSQL4.1 UPDATE llx_chargesociales set tms = date_creation WHERE tms = '0000-00-00 00:00:00';
ALTER TABLE llx_actioncomm DROP COLUMN propalrowid;
ALTER TABLE llx_actioncomm DROP COLUMN fk_commande;
ALTER TABLE llx_product_stock DROP COLUMN location;
-- DROP TABLE llx_c_methode_commande_fournisseur;
-- DROP TABLE llx_c_source;