This commit is contained in:
Laurent Destailleur 2012-11-14 01:20:36 +01:00
parent 3dd9d20d53
commit df42dda452

View File

@ -201,6 +201,8 @@ class Export
*
* @param int $indice Indice of export
* @param array $array_selected Filter on array of fields to export
* @param array $array_filterValue Filter on array of fields to export
* @param array $array_filtered Array with filters values
* @return string SQL String. Example "select s.rowid as r_rowid, s.status as s_status from ..."
*/
function build_sql($indice, $array_selected, $array_filterValue, $array_filtered)
@ -309,14 +311,16 @@ class Export
}
/**
* conditionDate
*
* @param unknown $Field
* @param unknown $Value
* @param unknown $Sens
* @return string
* @param string $Field Field operand 1
* @param string $Value Value operand 2
* @param string $Sens Comparison operator
* @return string
*/
function conditionDate($Field, $Value, $Sens)
{
// FIXME date_format is forbidden, not performant and no portable. Use instead BETWEEN
if (strlen($Value)==4) $Condition=" date_format(".$Field.",'%Y') ".$Sens." ".$Value;
elseif (strlen($Value)==6) $Condition=" date_format(".$Field.",'%Y%m') ".$Sens." '".$Value."'";
else $Condition=" date_format(".$Field.",'%Y%m%d') ".$Sens." ".$Value;
@ -452,6 +456,8 @@ class Export
* @param string $model Export format
* @param string $datatoexport Name of dataset to export
* @param array $array_selected Filter on array of fields to export
* @param array $array_filterValue Filter on array of fields with a filter
* @param array $array_filtered Values of filters
* @param string $sqlquery If set, transmit a sql query instead of building it from arrays
* @return int <0 if KO, >0 if OK
*/
@ -710,7 +716,10 @@ class Export
}
/**
* Output list all export models
* TODO Move this into a class htmlxxx.class.php
*
* @return void
*/
function list_export_model()
{