+ 1

Sorry to bother i am asking how can i use 2 tables in select like this $query = mysqli_query($con," select from user where

Sorry to bother i am asking how can i use 2 tables in select like this $query = mysqli_query($con," select from user where password $password then select from shoplistmember where email $ email and select from tomorrow as tmrrw Any help

24th Aug 2020, 8:41 AM
Hoo Lee Sheet
Hoo Lee Sheet - avatar
18 ответов
+ 2
Мг. Кнап🌠 At the moment we don't even know the OP's table structure, we need to be sure that the tables involved have same number of columns before we can use UNION IIRC.
24th Aug 2020, 9:23 AM
Ipang
+ 1
Ipang oh yes, i didn't thought about it.. ;)
24th Aug 2020, 9:24 AM
Мг. Кнап🌠
Мг. Кнап🌠 - avatar
+ 1
Hoo Lee Sheet as Ipang mentioned you need to be more precise about your table structure
24th Aug 2020, 9:27 AM
Мг. Кнап🌠
Мг. Кнап🌠 - avatar
+ 1
Ok check the DM
24th Aug 2020, 9:46 AM
Мг. Кнап🌠
Мг. Кнап🌠 - avatar
+ 1
Ok
25th Aug 2020, 2:16 AM
Muhammad Sulaiman Usman
Muhammad Sulaiman Usman - avatar
+ 1
ARE YOU KIDDING? if you can read users pwd directly from dB I don't want to be a user. Sth from your dB is out of control.
25th Aug 2020, 1:37 PM
Oma Falk
Oma Falk - avatar
+ 1
Oma Falk actually, I looked into his problem, it was totally different issue, he wanted to create multilevel marketting sort of registeration and login, where user puts some reference code from parent user, and joins under it's node
25th Aug 2020, 1:49 PM
Мг. Кнап🌠
Мг. Кнап🌠 - avatar
0
"SELECT * FROM user WHERE password = $password UNION SELECT * FROM shoplistmember WHERE email = $email UNION SELECT * FROM tomorrow"
24th Aug 2020, 9:01 AM
Мг. Кнап🌠
Мг. Кнап🌠 - avatar
0
I tried union didnt work
24th Aug 2020, 9:25 AM
Hoo Lee Sheet
Hoo Lee Sheet - avatar
0
$query = mysqli_query($con,"select * from user where email='$email' and password='$password' UNION select * from pin_list where pin='$pin'");
24th Aug 2020, 9:25 AM
Hoo Lee Sheet
Hoo Lee Sheet - avatar
0
what is the relation between "tomorrow" and other tables?
24th Aug 2020, 9:28 AM
Мг. Кнап🌠
Мг. Кнап🌠 - avatar
0
This is the correct table
24th Aug 2020, 9:30 AM
Hoo Lee Sheet
Hoo Lee Sheet - avatar
0
Email email password password pin amd pin
24th Aug 2020, 9:30 AM
Hoo Lee Sheet
Hoo Lee Sheet - avatar
0
I wanna combine them all when user login he has t put password email and a pin
24th Aug 2020, 9:30 AM
Hoo Lee Sheet
Hoo Lee Sheet - avatar
0
so you want to take email, password and a pin all within the same form, and when you submit the form the email and password is checked with users table, and the email is checked with shoplistmember table, and the pin with tomorrow table??
24th Aug 2020, 9:37 AM
Мг. Кнап🌠
Мг. Кнап🌠 - avatar
0
Yes bro put the pin will be in pin_list and shopmember and tomorrow is not needed then
24th Aug 2020, 9:40 AM
Hoo Lee Sheet
Hoo Lee Sheet - avatar
0
Like
24th Aug 2020, 9:40 AM
Hoo Lee Sheet
Hoo Lee Sheet - avatar
0
From user table Email =email table and password =password then in pin from pin_list where pin=pin then i dont need tomorrow and shopmember s
24th Aug 2020, 9:41 AM
Hoo Lee Sheet
Hoo Lee Sheet - avatar