I have a table with 3 cols, incremeting id, name, and data
What i’m trying to achieve
you enter a $name… and returns $data…
then
it takes $data and finds all $names that have the same $data.
SELECT * FROM table WHERE name ='$name' data='$data' and data!='0'
does not seem to cut it..
I’m basically trying to get all rows that have the same data as the entered $name’s $data.
thanks in advance.
You may want to try the following:
Test case:
Result:
The nested query solution suggested by @Borealid is another valid solution that returns the same result: