mysql - How to combine these two credentials Queries? -


i wanted make 2 queries 1 query. purpose of query check if credentials match in either of table "user_credentials" or "workers". how can so?

select user_name user_credentials user_name = '$user_email' , password = '$user_password'

select user_name workers user_name = '$user_email' , password = '$user_password'

try

select user_name user_credentials user_name = '$user_email' , password = '$user_password'  union  select user_name workers user_name = '$user_email' , password = '$user_password' 

then check mysqli_num_rows or mysql_num_rows


Comments

Popular posts from this blog

c - CUDA code not processing if block properly -

Android Capture Image From Camera -

Define custom list-style-type in CSS -