mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 17:48:25 +01:00
Fix: Removed of a column
This commit is contained in:
@@ -860,13 +860,13 @@ class DoliDb
|
||||
}
|
||||
|
||||
/**
|
||||
\brief Ins<EFBFBD>re un nouveau champ dans une table
|
||||
\param table Nom de la table
|
||||
\param field_name Nom du champ <EFBFBD> ins<EFBFBD>rer
|
||||
\param field_desc Tableau associatif de description duchamp <EFBFBD> ins<EFBFBD>rer[nom du param<EFBFBD>tre][valeur du param<61>tre]
|
||||
\param field_position Optionnel ex.: "after champtruc"
|
||||
\return int <0 si KO, >0 si OK
|
||||
*/
|
||||
* \brief Insert a new field in table
|
||||
* \param table Nom de la table
|
||||
* \param field_name Nom du champ a inserer
|
||||
* \param field_desc Tableau associatif de description du champ a inserer[nom du parametre][valeur du param<61>tre]
|
||||
* \param field_position Optionnel ex.: "after champtruc"
|
||||
* \return int <0 si KO, >0 si OK
|
||||
*/
|
||||
function DDLAddField($table,$field_name,$field_desc,$field_position="")
|
||||
{
|
||||
// cl<63>s recherch<63>es dans le tableau des descriptions (field_desc) : type,value,attribute,null,default,extra
|
||||
@@ -894,6 +894,26 @@ class DoliDb
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* \brief Drop a field in table
|
||||
* \param table Nom de la table
|
||||
* \param field_name Nom du champ a inserer
|
||||
* \return int <0 si KO, >0 si OK
|
||||
*/
|
||||
function DDLDropField($table,$field_name)
|
||||
{
|
||||
$sql= "ALTER TABLE ".$table." DROP COLUMN `".$field_name."`";
|
||||
dolibarr_syslog($sql,LOG_DEBUG);
|
||||
if (! $this->query($sql))
|
||||
{
|
||||
$this->error=$this->lasterror();
|
||||
return -1;
|
||||
}
|
||||
else return 1;
|
||||
}
|
||||
|
||||
|
||||
function getDefaultCharacterSetDatabase(){
|
||||
/*
|
||||
$resql=$this->query('SHOW VARIABLES LIKE \'character_set_database\'');
|
||||
|
||||
Reference in New Issue
Block a user