Question : can i apply 2 conditions in where clause?

can i apply 2 conditions in where clause.like

where countryid=".$countryid." , distributorid". between $p ." and 1 ";

//here simply i am doing, i am fetching the country id and putting a pagination , so applying limit in the where clause. my database is mdb database.

Answer : can i apply 2 conditions in where clause?

if ryancys query gives you the error try this ( just added alias "b" for the tblcountrydistributor table)


$sql2="select a.* from tbldistributor a inner join tblcountrydistributor b on b.distributorid=a.id where b.countryid=".$countryid." and b.distributorid between ".$p." and 1 ";
Random Solutions  
 
programming4us programming4us