php-db | 2001071
Date: 07/08/01
- Next message: Matthew Loff: "RE: [PHP-DB] Dynamic SQL + result resource error"
- Previous message: Ken Sommers: "Re: [PHP-DB] Re: Homesite Server Mapping"
- Next in thread: Matthew Loff: "RE: [PHP-DB] Dynamic SQL + result resource error"
- Reply: Matthew Loff: "RE: [PHP-DB] Dynamic SQL + result resource error"
- Reply: Michael Rudel: "RE: [PHP-DB] Dynamic SQL + result resource error"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Why is this code generating an error when it outputs a
valid SQL statement? (there are no parse errors)
//$find is text box input
$wordsarray = explode(" ",$find);
$sql = "SELECT bandname FROM bands WHERE (bandname
LIKE ";
$i = 0;
while ($i < count($wordsarray))
{
$word = current($wordsarray);
next($wordsarray);
$sql=$sql."$word)";
$i++;
}
print "$sql<hr>";
while ($myrow=mysql_fetch_row($sql))
{
print "$myrow[0],<p>";
}
=====
Mark
eyesyte <email protected>
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe <email protected> For additional commands, e-mail: php-db-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Matthew Loff: "RE: [PHP-DB] Dynamic SQL + result resource error"
- Previous message: Ken Sommers: "Re: [PHP-DB] Re: Homesite Server Mapping"
- Next in thread: Matthew Loff: "RE: [PHP-DB] Dynamic SQL + result resource error"
- Reply: Matthew Loff: "RE: [PHP-DB] Dynamic SQL + result resource error"
- Reply: Michael Rudel: "RE: [PHP-DB] Dynamic SQL + result resource error"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

