+ 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
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.
+ 1
Ipang oh yes, i didn't thought about it.. ;)
+ 1
Hoo Lee Sheet as Ipang mentioned you need to be more precise about your table structure
+ 1
Ok check the DM
+ 1
Ok
+ 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.
+ 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
0
"SELECT *
FROM user
WHERE password = $password
UNION
SELECT *
FROM shoplistmember
WHERE email = $email
UNION
SELECT *
FROM tomorrow"
0
I tried union didnt work
0
$query = mysqli_query($con,"select * from user where email='$email' and password='$password' UNION select * from pin_list where pin='$pin'");
0
what is the relation between "tomorrow" and other tables?
0
This is the correct table
0
Email email password password pin amd pin
0
I wanna combine them all when user login he has t put password email and a pin
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??
0
Yes bro put the pin will be in pin_list and shopmember and tomorrow is not needed then
0
Like
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