CodeIgniter Forums
modify 'search' at phppointofsale project - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: modify 'search' at phppointofsale project (/showthread.php?tid=32894)



modify 'search' at phppointofsale project - El Forum - 08-09-2010

[eluser]Unknown[/eluser]
hi, i'm new in using codeigniter.... sometimes i still get confused with the method... Smile

and now, i'm trying to modify the 'search' module.
the query is like this:

SELECT *
FROM `phppos_customers`
LEFT JOIN phppos_people
ON phppos_people.person_id = phppos_customers.person_id
WHERE emp_code = 3
AND (
first_name LIKE '%ra%'
OR last_name LIKE '%ra%'
OR email like '%ra%'
or phone_number like '%ra%'
or account_number like '%ra%'
or concat(`first_name`,' ',`last_name`) like '%ra%'
)

how can i add '(' and ')' in the module?
because if i don't give it '(' and ')', the result doesn't return the correct one...

note: i have added new field to the table

thanks.. Smile