0

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

17th Nov 2017, 10:06 AM
swapnil Singh
swapnil Singh - avatar
3 ответов
0
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 :)
17th Nov 2017, 11:16 AM
Thomas Meejumlong
Thomas Meejumlong - avatar
0
thankyou thomas ..btw why every one uses only one table
17th Nov 2017, 11:57 AM
swapnil Singh
swapnil Singh - avatar
0
It's easier and you don't need to Join or even check twice the Database Tables. Smaller Code and Faster. :)
17th Nov 2017, 2:16 PM
Thomas Meejumlong
Thomas Meejumlong - avatar