0

Hi,
How do I change the query below to search in two fields instead of just one? For example, I want the query to search two fields: job_id and jobtype - instead of just job_id.

$query = "SELECT lastname, firstname, state, zip, jobtype, otherjobtype, nightavail, weekendavail, ptft, resume FROM data WHERE job_id LIKE '%" . $trimmed . "%'
 ORDER BY lastname ";

:yawn:

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by hielo
0
$query = "SELECT lastname, firstname, state, zip, jobtype, otherjobtype, nightavail, weekendavail, ptft, resume FROM data 
				WHERE (job_id LIKE '%" . $trimmed . "%') OR (jobtype LIKE '%" . $trimmed . "%')
 ORDER BY lastname ";
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.