bradgrafelman;11004461 wrote:It's the same as using the logical operator || in PHP. You're joining three different comparisons (name equals something, number equals something, address equals something) by OR'ing them together into a single expression.
Ok, I understood the concept however have trouble with the syntax
Have tried the following and they didn't work:
$query = "SELECT account_number, route, account_name, address, address_line_2, city, state, zip, area_code, phone, ext, fax, email, online_customer
FROM lookup
WHERE account_number OR account_name OR address = '$lookup' ";
and tried this based on what i was able to find on the subject
$query = "SELECT account_number, route, account_name, address, address_line_2, city, state, zip, area_code, phone, ext, fax, email, online_customer
FROM lookup
WHERE [account_number [OR] account_name [OR] address]= '$lookup' ";
And latest attempt
$query = "SELECT account_number, route, account_name, address, address_line_2, city, state, zip, area_code, phone, ext, fax, email, online_customer
FROM lookup
WHERE account_number [OR] account_name [OR] address = '$lookup' ";
And this way only brings up results if the search term is the account name and brings up nothing with search term as account_number
$query = "SELECT account_number, route, account_name, address, address_line_2, city, state, zip, area_code, phone, ext, fax, email, online_customer
FROM lookup
WHERE account_number OR account_name = '$lookup' ";
is there online source that can break this down so that i may learn and better understand?