Lenght of fields
This commit is contained in:
parent
29422a9ff9
commit
7507a71121
@ -5022,7 +5022,9 @@ function dol_getmypid()
|
|||||||
*
|
*
|
||||||
* @param string|string[] $fields String or array of strings, filled with the name of all fields in the SQL query we must check (combined with a OR)
|
* @param string|string[] $fields String or array of strings, filled with the name of all fields in the SQL query we must check (combined with a OR)
|
||||||
* @param string $value The value to look for.
|
* @param string $value The value to look for.
|
||||||
* If param $mode is 0, can contains several keywords separated with a space, like "keyword1 keyword2" = We want record field like keyword1 and field like keyword2
|
* If param $mode is 0, can contains several keywords separated with a space or |
|
||||||
|
* like "keyword1 keyword2" = We want record field like keyword1 AND field like keyword2
|
||||||
|
* or like "keyword1|keyword2" = We want record field like keyword1 OR field like keyword2
|
||||||
* If param $mode is 1, can contains an operator <, > or = like "<10" or ">=100.5 < 1000"
|
* If param $mode is 1, can contains an operator <, > or = like "<10" or ">=100.5 < 1000"
|
||||||
* If param $mode is 2, can contains a list of id separated by comma like "1,3,4"
|
* If param $mode is 2, can contains a list of id separated by comma like "1,3,4"
|
||||||
* @param integer $mode 0=value is list of keywords, 1=value is a numeric test (Example ">5.5 <10"), 2=value is a list of id separated with comma (Example '1,3,4')
|
* @param integer $mode 0=value is list of keywords, 1=value is a numeric test (Example ">5.5 <10"), 2=value is a list of id separated with comma (Example '1,3,4')
|
||||||
@ -5081,8 +5083,15 @@ function natural_search($fields, $value, $mode=0, $nofinaland=0)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$newres .= ($i2 > 0 ? ' OR ' : '') . $field . " LIKE '%" . $db->escape(trim($crit)) . "%'";
|
$textcrit = '';
|
||||||
$i2++; // a criteria was added to string
|
$tmpcrits = explode('|',$crit);
|
||||||
|
$i3 = 0;
|
||||||
|
foreach($tmpcrits as $tmpcrit)
|
||||||
|
{
|
||||||
|
$newres .= (($i2 > 0 || $i3 > 0) ? ' OR ' : '') . $field . " LIKE '%" . $db->escape(trim($tmpcrit)) . "%'";
|
||||||
|
$i3++;
|
||||||
|
}
|
||||||
|
$i2++; // a criteria was added to string
|
||||||
}
|
}
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -274,10 +274,10 @@ if ($resql)
|
|||||||
print '<input type="text" class="flat" name="search_ref" value="'.$search_ref.'" size="6">';
|
print '<input type="text" class="flat" name="search_ref" value="'.$search_ref.'" size="6">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
print '<input type="text" class="flat" name="search_label" value="'.$search_label.'">';
|
print '<input type="text" class="flat" name="search_label" size="8" value="'.$search_label.'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
print '<input type="text" class="flat" name="search_societe" value="'.$search_societe.'">';
|
print '<input type="text" class="flat" name="search_societe" size="8" value="'.$search_societe.'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
// Sale representative
|
// Sale representative
|
||||||
print '<td class="liste_titre"> </td>';
|
print '<td class="liste_titre"> </td>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user