php - Check whether MySQL record exists based on 2 parameters -



i'm creating php system needs check whether record exists.

i'm fine checking whether record exist matches single column:

mysql_query("select * articles s_id = '$myvar'") 

however, want see whether there exact match 2 columns in database (a_id , s_id), while ignoring match of 3rd column.

any ideas on how check match on 2 parameters exist?


thanks taking - feel free ask clarifications.

mysql_query("select * articles s_id = '$myvar' , a_id= '$myvar2'") 

Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -