Used AND OR operator condition in Mysql PHP in query

Description

Used AND OR operator condition in Mysql PHP in query

And OR operator condition query Used in Mysql PHP with where and between condition and

Used to brackets to group wise AND OR condition  

Used AND OR operator and fetch the records in Mysql With PHP

Select the record data wise and name wise with And OR operator condition query

 

 $show=mysql_query("SELECT * FROM phone WHERE  mblno = '$phonen' AND (state = 'In' OR state = '') ORDER BY id DESC LIMIT 0 , 50");

 $show=mysql_query("SELECT * FROM phone WHERE (state =  'In' OR state =  '') AND today BETWEEN  '$startdate' AND  '$enddate' ORDER BY id DESC LIMIT 0 , 50");