garf3r
-
Posts
4 -
Joined
-
Last visited
Posts posted by garf3r
-
-
I'm just guessing here, i found this in the user.php
public static function get_users($search=array(),$mysql=false){ // limit based on customer id /*if(!isset($_REQUEST['customer_id']) || !(int)$_REQUEST['customer_id']){ return array(); }*/ // build up a custom search sql query based on the provided search fields $sql = "SELECT *,u.user_id AS id "; $sql .= ", u.name AS name "; $from = " FROM `"._DB_PREFIX."user` u "; $where = " WHERE 1 "; $where .= " AND u.customer_id = 0 "; if(isset($search['generic']) && $search['generic']){ $str = mysql_real_escape_string($search['generic']); $where .= " AND ( "; $where .= " u.name LIKE '%$str%' OR "; $where .= " u.email LIKE '%$str%' OR "; $where .= " u.phone LIKE '%$str%' OR "; $where .= " u.mobile LIKE '%$str%' "; $where .= ' ) '; } if(isset($search['customer_id']) && $search['customer_id']){ /*$str = mysql_real_escape_string($search['customer_id']); $where .= " AND u.customer_id = '$str'"; $sql .= " , c.primary_user_id AS is_primary "; $from .= " LEFT JOIN `"._DB_PREFIX."customer` c ON u.customer_id = c.customer_id ";*/ set_error('Bad usage of get_user() - please report this error.'); return array(); } if(isset($search['security_role_id']) && (int)$search['security_role_id']>0){ $str = (int)$search['security_role_id']; $from .= " LEFT JOIN `"._DB_PREFIX."user_role` ur ON u.user_id = ur.user_id"; $where .= " AND ur.security_role_id = $str"; } foreach(array('email') as $key){ if(isset($search[$key]) && $search[$key] !== ''&& $search[$key] !== false){ $str = mysql_real_escape_string($search[$key]); $where .= " AND u.`$key` LIKE '$str'"; } }
I'm guessing it may be something to do with that?
-
It's the Ultimate Client Manager from code canyon? I could supply the files if needed, most of it has just been a case of changing fields etc, but the search for this doesn't seem to hook it
-
Hi there, new to the forum
Ok so i have a crm and i'm trying to add bits, been pretty succesful at most of it, however i've added a new field "status" and i want to be able to search this field, i've tried copying and changing the existing code, but it doesn't seem to be grabbing it.
So here's some exisiting code (that works and searches the field marked "Address"
'address' => array( 'title' => _l('Address:'), 'field' => array( 'type' => 'text', 'name' => 'search[address]', 'value' => isset($search['address'])?$search['address']:'', 'size' => 15, ) ),
'status' => array( 'title' => _l('Status:'), 'field' => array( 'type' => 'text', 'name' => 'search[status]', 'value' => isset($search['status'])?$search['status']:'', 'size' => 15, ) ),
I thought a simple name change like above would work, but it doesn't pull anything through, anyone got any ideas?
Search Code not working
in PHP Coding Help
Posted
This is my array
And this is my search string (which comes up blank)
Any ideas?