Re: [PHP-DB] Search problems... :(
i've correct the problem the script was right thx -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Search problems... :(
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 "" . date("j/n/y", $row[data]) . " - $row[titolo]"; } 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
Re: [PHP-DB] Search problems... :(
Marco you have made a typing mistake in $key or $Keys... :-D Remoevd all non essential lines... On Sun, 13 Jul 2003 17:13:03 +0200 "Marco Mastrorilli" <[EMAIL PROTECTED]> wrote: > > $keys = explode (" ", $_POST ["chiave"]); > > foreach ($Keys as $single_word) --- Everything goes right till foreach ($Keys as $single_word) that RETURNS: Warning: Invalid argument supplied for foreach() in c:\programmi\apache group\apache\test\prova\result.php on line Do U know why? Thanks in advance Marco -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php