mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 16:48:49 +01:00
Make query into a loop to check all std fields.
This commit is contained in:
parent
2489290aea
commit
3993c41752
@ -472,20 +472,24 @@
|
|||||||
|
|
||||||
if ($query)
|
if ($query)
|
||||||
{
|
{
|
||||||
$sql = "SELECT * FROM $this->std_table WHERE (bday LIKE '%$query%' OR n_family LIKE '"
|
$query = ereg_replace("'",'',$query);
|
||||||
. "%$query%' OR n_given LIKE '%$query%' OR email LIKE '%$query%' OR "
|
$query = ereg_replace('"','',$query);
|
||||||
. "adr_one_street LIKE '%$query%' OR adr_one_locality LIKE '%$query%' OR adr_one_region LIKE '%$query%' OR "
|
|
||||||
. "adr_one_postalcode LIKE '%$query%' OR adr_one_countryname LIKE '%$query%' OR "
|
$sql = "SELECT * FROM $this->std_table WHERE (";
|
||||||
. "adr_two_street LIKE '%$query%' OR adr_two_locality LIKE '%$query%' OR adr_two_region LIKE '%$query%' OR "
|
reset($this->stock_contact_fields);
|
||||||
. "adr_two_postalcode LIKE '%$query%' OR adr_two_countryname LIKE '%$query%' OR "
|
while(list($f,$x) = each($this->stock_contact_fields))
|
||||||
. "org_name LIKE '%$query%' OR org_unit LIKE '%$query%') " . $fand . $filtermethod . $ordermethod;
|
{
|
||||||
|
$sql .= " $f LIKE '%$query%' OR ";
|
||||||
|
}
|
||||||
|
$sql = substr($sql,0,-3) . ') ' . $fand . $filtermethod . $ordermethod;
|
||||||
|
unset($f); unset($x);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$sql = "SELECT id,lid,tid,owner,access,cat_id $t_fields FROM $this->std_table " . $fwhere
|
$sql = "SELECT id,lid,tid,owner,access,cat_id $t_fields FROM $this->std_table " . $fwhere
|
||||||
. $filtermethod . ' ' . $ordermethod;
|
. $filtermethod . ' ' . $ordermethod;
|
||||||
}
|
}
|
||||||
if ($DEBUG) { echo "<br>$sql"; }
|
if ($DEBUG) { echo '<br>' . $sql; }
|
||||||
|
|
||||||
$db2 = $this->db;
|
$db2 = $this->db;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user