758

Простой поиск в БД

вот такой вопрос:CODE $query = "SELECT name,lastname,email FROM info WHERE $category = '$key'"; $result = mysql_result($query); if (mysql_fetch_row($result) == 0) print "Sorry, but no matches were found. Please try your search again:"; list($name, $lastname, $email) = mysql_fetch_row($result); print "

Information:

"; print "Name: $name
"; print "LastName $lastname
"; print "Email: $email
"; три переменные пл которым орг. поиск:$name $lastname $emailполучаем их из формыCODE
Search by:

Keyword: 

вроде всё в норме, вот почему то не работает?вот какая ошибка вылазит:Warning: Wrong parameter count for mysql_result() in e:\home\localhost\www\search.php on line 7Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in e:\home\localhost\www\search.php on line 9Sorry, but no matches were found. Please try your search again:Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in e:\home\localhost\www\search.php on line 12
0