I have a MySQL DB that resembles the following:
uid suid
1 5
1 6
2 5
5 1
5 2
I give him the only unique "uid" through the POST method, name it 1. What I need to do is return all "suid", where $ uid "has" suid AND suid (as uid) "has" $ uid (like suid. ) So, in the above example, the script should return only 5.
I know my first step is
"Select * FROM table Where uid = $uid"
then maybe i need to skip the results and query DB WHERE suid = $ uid. I do not know how to execute the second request. Any suggestions?
source
share