Guest User

Untitled

a guest
Jul 20th, 2018
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. SELECT 'first' AS source, ...
  2. FROM firstable
  3. WHERE (username = $user) and (password = $password)
  4.  
  5. UNION
  6.  
  7. SELECT 'second' as source, ...
  8. FROM secondtable
  9. WHERE (....)
  10.  
  11. if ($row['source'] == 'first') { ... came from first table ... }
  12.  
  13. select * from table_A where id = 6 union select * from table_b where other_id = 6;
Add Comment
Please, Sign In to add comment