Re: Search problems... :(

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have correct case sensitive error but it still don't work:

RESULT CODE:

$keys = explode (" ", $_POST ["chiave"]);

$query = "";

foreach ($keys as $parola){
$parola = trim($parola);
if ($parola != "")
$query .= "titolo LIKE '%$parola%' OR testo LIKE '%$parola%' OR autore LIKE
'%$parola%' OR ";
}
$query .= "0";

$query = "SELECT id, titolo, data FROM news WHERE " . $query;

$result = mysql_query($query, $db);

while ($row = mysql_fetch_array($result))
{ echo "<a href=\"view.php?id=$row[id]\">" . date("j/n/y", $row[data]) . " -
$row[titolo]</a><br>"; }

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result
resource in c:\programmi\apache group\apache\test\prova\result.php on line

Any suggestion?




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux