Multiple select | Sololearn: Learn to code for FREE!


Multiple select

i have two tables one is for user and second one is for admin and a common login page with username and password ..i want that query when user or admin fill there login credential and press login button then which table matches the login credential there data should be fetched so what should be the query

11/17/2017 10:06:34 AM

swapnil Singh

3 Answers

New Answer


I would recommend to use only one table for that and add a column "admin" with (INT) 0(User) and 1(Admin). This would be easier :)


thankyou thomas ..btw why every one uses only one table


It's easier and you don't need to Join or even check twice the Database Tables. Smaller Code and Faster. :)