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++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -