forked from Wavyzz/dolibarr
Database: factorized idate()
This commit is contained in:
@@ -77,6 +77,18 @@ abstract class DoliDB implements Database
|
|||||||
return 'IF('.$test.','.$resok.','.$resko.')';
|
return 'IF('.$test.','.$resok.','.$resko.')';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert (by PHP) a GM Timestamp date into a string date with PHP server TZ to insert into a date field.
|
||||||
|
* Function to use to build INSERT, UPDATE or WHERE predica
|
||||||
|
*
|
||||||
|
* @param string $param Date TMS to convert
|
||||||
|
* @return string Date in a string YYYYMMDDHHMMSS
|
||||||
|
*/
|
||||||
|
function idate($param)
|
||||||
|
{
|
||||||
|
return dol_print_date($param,"%Y%m%d%H%M%S");
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Define sort criteria of request
|
* Define sort criteria of request
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -518,19 +518,6 @@ class DoliDBMysql extends DoliDB
|
|||||||
return addslashes($stringtoencode);
|
return addslashes($stringtoencode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Convert (by PHP) a GM Timestamp date into a string date with PHP server TZ to insert into a date field.
|
|
||||||
* Function to use to build INSERT, UPDATE or WHERE predica
|
|
||||||
*
|
|
||||||
* @param string $param Date TMS to convert
|
|
||||||
* @return string Date in a string YYYYMMDDHHMMSS
|
|
||||||
*/
|
|
||||||
function idate($param)
|
|
||||||
{
|
|
||||||
return dol_print_date($param,"%Y%m%d%H%M%S");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return last request executed with query()
|
* Return last request executed with query()
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -529,19 +529,6 @@ class DoliDBMysqli extends DoliDB
|
|||||||
return addslashes($stringtoencode);
|
return addslashes($stringtoencode);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Convert (by PHP) a GM Timestamp date into a string date with PHP server TZ to insert into a date field.
|
|
||||||
* Function to use to build INSERT, UPDATE or WHERE predica
|
|
||||||
*
|
|
||||||
* @param string $param Date TMS to convert
|
|
||||||
* @return string Date in a string YYYYMMDDHHMMSS
|
|
||||||
*/
|
|
||||||
function idate($param)
|
|
||||||
{
|
|
||||||
return dol_print_date($param,"%Y%m%d%H%M%S");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return last request executed with query()
|
* Return last request executed with query()
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -662,18 +662,6 @@ class DoliDBSqlite extends DoliDB
|
|||||||
return $this->db->quote($stringtoencode);
|
return $this->db->quote($stringtoencode);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Convert (by PHP) a GM Timestamp date into a PHP server TZ to insert into a date field.
|
|
||||||
* Function to use to build INSERT, UPDATE or WHERE predica
|
|
||||||
*
|
|
||||||
* @param string $param Date TMS to convert
|
|
||||||
* @return string Date in a string YYYYMMDDHHMMSS
|
|
||||||
*/
|
|
||||||
function idate($param)
|
|
||||||
{
|
|
||||||
return dol_print_date($param,"%Y%m%d%H%M%S");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Renvoie la derniere requete soumise par la methode query()
|
* Renvoie la derniere requete soumise par la methode query()
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user