sql - MySQL select query -


i have simple mysql query selects columns table based off 2 requirements.

`$dbsearchrecords = mysql_query("select * booking bookingid = '$jobno_search' , date between '$datefrom_search' , '$dateto_search'" )` 

i trying query search either 1 or both of requirements. bookingid = '$jobno_search' , date between '$datefrom_search' , '$dateto_search'

at moment parameters need present result , need able search bookinid or date range well.

cheers guys.

what about...

$dbsearchrecords = mysql_query(    "select * booking     bookingid = '$jobno_search'     or ( date between '$datefrom_search' , '$dateto_search' )     or itemid = $itemid    or job_no = $job_no    or rego = $rego   "  ) 

the or works and/or.


Comments

Popular posts from this blog

Add email recipient to all new Trac tickets -

400 Bad Request on Apache/PHP AddHandler wrapper -

php - Change action and image src url's with jQuery -