php - How can I use multiple values in a "where" clause? -


my code , database following

$my=mysql_query("select * users email='ids'")or die(mysql_error);   id___email___________pass 1    abc@d.com        123 2    xxx@x.uk         333 3    ah@cc.com        555 

i need sintax in wich select * id='1 , 3' , when echo $row[email] return

abc@d.com ah@cc.com 

finded correct syntax

$all=mysql_query("select * users id in ('1','2','3')"); while($row = mysql_fetch_assoc($all)) {    echo $row['name']; } 

use in clause records multiple emails.

$my=mysql_query("select * users email in ('$email','$email2','$email3')") or die(mysql_error); 

Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

jsf - How to ajax update an item in the footer of a PrimeFaces dataTable? -

jquery - Keeping Kendo Datepicker in min/max range -