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) -

xcode - Swift Playground - Files are not readable -

jboss7.x - JBoss AS 7.3 vs 7.4 and differences -