Probably a simple solution, but Im stumped.
Say I have a database, each record has...
Phone Email Name
Phone numbers are stored in the databse like this.
(123) 456-7890
The following query allows me to search all three fields. Its appended to the rest of the query string.
$sql .= " (Phone LIKE '($string') OR (Name LIKE '%$string%') OR (Email LIKE '%$string%') ) ORDER BY Name $DEBUG ";
I want to be able to enter a 3 digit area code, and have those matches come up, but when I try to regex the left paren, it doesn't find them.
Does it just need to be escaped first? or would it be easier to just get rid of the parens in the database, and store phone numbers like...
123 456-7890
There's gotta be an easy way to do this.