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.