query mysql_query SELECT FROM users WHERE login word OR inn word OR na

1
2
3
4
5
6
7
8
9
<?
$query= mysql_query("SELECT * FROM users WHERE login='$word' OR inn='$word' OR name='$word' OR surname='$word' OR supername='$word' ORDER BY id");
if((int) mysql_result(mysql_query("SELECT COUNT(*) FROM users WHERE login='$word' OR inn='$word' OR name='$word' OR surname='$word' OR supername='$word' ORDER BY id"), 0) === 0)
echo 'нихуя не нашли';
else
while($row=mysql_fetch_array($query))
echo $row['id'] . '<br/>';
?>