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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
<?
$query= mysql_query("SELECT * FROM users WHERE login='$word' OR inn='$word' OR name='$word' OR surname='$word' OR supername='$word' ORDER BY id");
$found = false;
while($row=mysql_fetch_array($query)) {
$found = true;
echo $row['id'] . '<br/>';
}
if(!$found)
die('нихуя не найдено');