tags:

views:

36

answers:

2

I have to use a single text box to use for search by order id or first name or last name or phone or email address, how can i Identify the input value to be related to required fields, if u have the idea to make it happen plss guide me...

I have this type of query to be executed when keyword found.

select orders.* 
from orders 
join customers on customers.customerid=orders.customerid
where customers.firstname = 'John' -- or whatever

I am working in PHP and Mysql

+2  A: 

I think you can not know. The only way is you write all of the OR to check all the related condition

vodkhang
A: 

you can add a second input. for example "search in"..

kgb