2
0
forked from Wavyzz/dolibarr

Database: factorized idate()

This commit is contained in:
Raphaël Doursenaud
2014-03-15 06:04:16 +01:00
parent 64fbefdb7c
commit 0ab6fcaaca
4 changed files with 12 additions and 38 deletions

View File

@@ -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
* *

View File

@@ -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()
* *

View File

@@ -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()
* *

View File

@@ -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()
* *