Merge pull request #9095 from IAS-SYSTEMS-CSC/dolibarr-fixes
fix sql error functions.lib.php
This commit is contained in:
commit
ba36d1aef0
@ -7576,7 +7576,7 @@ function getDictvalue($tablename, $field, $id, $checkentity=false, $rowidfield='
|
|||||||
{
|
{
|
||||||
$dictvalues[$tablename] = array();
|
$dictvalues[$tablename] = array();
|
||||||
$sql = 'SELECT * FROM '.$tablename.' WHERE 1';
|
$sql = 'SELECT * FROM '.$tablename.' WHERE 1';
|
||||||
if ($checkentity) $sql.= ' entity IN (0,'.getEntity('').')';
|
if ($checkentity) $sql.= ' AND entity IN (0,'.getEntity('').')';
|
||||||
|
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
|
|||||||
@ -130,8 +130,8 @@ $dolibarr_main_url_root_alt=(empty($dolibarr_main_url_root_alt)?'':trim($dolibar
|
|||||||
$dolibarr_main_document_root=trim($dolibarr_main_document_root);
|
$dolibarr_main_document_root=trim($dolibarr_main_document_root);
|
||||||
$dolibarr_main_document_root_alt=(empty($dolibarr_main_document_root_alt)?'':trim($dolibarr_main_document_root_alt));
|
$dolibarr_main_document_root_alt=(empty($dolibarr_main_document_root_alt)?'':trim($dolibarr_main_document_root_alt));
|
||||||
|
|
||||||
if (empty($dolibarr_main_db_port)) $dolibarr_main_db_port=0; // Pour compatibilite avec anciennes configs, si non defini, on prend 'mysql'
|
if (empty($dolibarr_main_db_port)) $dolibarr_main_db_port=3306; // For compatibility with old configs, if not defined, we take 'mysql' type
|
||||||
if (empty($dolibarr_main_db_type)) $dolibarr_main_db_type='mysqli'; // Pour compatibilite avec anciennes configs, si non defini, on prend 'mysql'
|
if (empty($dolibarr_main_db_type)) $dolibarr_main_db_type='mysqli'; // For compatibility with old configs, if not defined, we take 'mysql' type
|
||||||
|
|
||||||
// Mysql driver support has been removed in favor of mysqli
|
// Mysql driver support has been removed in favor of mysqli
|
||||||
if ($dolibarr_main_db_type == 'mysql') $dolibarr_main_db_type = 'mysqli';
|
if ($dolibarr_main_db_type == 'mysql') $dolibarr_main_db_type = 'mysqli';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user