Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT 'first' AS source, ...
- FROM firstable
- WHERE (username = $user) and (password = $password)
- UNION
- SELECT 'second' as source, ...
- FROM secondtable
- WHERE (....)
- if ($row['source'] == 'first') { ... came from first table ... }
- select * from table_A where id = 6 union select * from table_b where other_id = 6;
Add Comment
Please, Sign In to add comment