mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 01:28:19 +01:00
Fix: space missing in order syntax in database handlers
This commit is contained in:
@@ -499,6 +499,35 @@ class DoliDb
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
\brief D<>fini le tri de la requ<71>te.
|
||||||
|
\param sortfield liste des champ de tri
|
||||||
|
\param sortorder ordre du tri
|
||||||
|
\return string chaine exprimant la syntax sql de l'ordre de tri
|
||||||
|
\TODO A mutualiser dans classe mere
|
||||||
|
*/
|
||||||
|
function order($sortfield=0,$sortorder=0)
|
||||||
|
{
|
||||||
|
if ($sortfield)
|
||||||
|
{
|
||||||
|
$return='';
|
||||||
|
$fields=split(',',$sortfield);
|
||||||
|
foreach($fields as $val)
|
||||||
|
{
|
||||||
|
if (! $return) $return.=' ORDER BY ';
|
||||||
|
else $return.=',';
|
||||||
|
|
||||||
|
$return.=$val;
|
||||||
|
if ($sortorder) $return.=' '.$sortorder;
|
||||||
|
}
|
||||||
|
return $return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\brief Formatage (par la base de donn<6E>es) d'un champ de la base au format TMS ou Date (YYYY-MM-DD HH:MM:SS)
|
\brief Formatage (par la base de donn<6E>es) d'un champ de la base au format TMS ou Date (YYYY-MM-DD HH:MM:SS)
|
||||||
afin de retourner une donn<6E>e toujours au format universel date TMS unix.
|
afin de retourner une donn<6E>e toujours au format universel date TMS unix.
|
||||||
|
|||||||
@@ -506,7 +506,7 @@ class DoliDb
|
|||||||
$fields=split(',',$sortfield);
|
$fields=split(',',$sortfield);
|
||||||
foreach($fields as $val)
|
foreach($fields as $val)
|
||||||
{
|
{
|
||||||
if (! $return) $return.='ORDER BY ';
|
if (! $return) $return.=' ORDER BY ';
|
||||||
else $return.=',';
|
else $return.=',';
|
||||||
|
|
||||||
$return.=$val;
|
$return.=$val;
|
||||||
|
|||||||
@@ -521,7 +521,7 @@ class DoliDb
|
|||||||
$fields=split(',',$sortfield);
|
$fields=split(',',$sortfield);
|
||||||
foreach($fields as $val)
|
foreach($fields as $val)
|
||||||
{
|
{
|
||||||
if (! $return) $return.='ORDER BY ';
|
if (! $return) $return.=' ORDER BY ';
|
||||||
else $return.=',';
|
else $return.=',';
|
||||||
|
|
||||||
$return.=$val;
|
$return.=$val;
|
||||||
|
|||||||
@@ -444,7 +444,7 @@ class DoliDb
|
|||||||
$fields=split(',',$sortfield);
|
$fields=split(',',$sortfield);
|
||||||
foreach($fields as $val)
|
foreach($fields as $val)
|
||||||
{
|
{
|
||||||
if (! $return) $return.='ORDER BY ';
|
if (! $return) $return.=' ORDER BY ';
|
||||||
else $return.=',';
|
else $return.=',';
|
||||||
|
|
||||||
$return.=$val;
|
$return.=$val;
|
||||||
|
|||||||
Reference in New Issue
Block a user