|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2000-07-12 08:38 UTC] jagas at computerconsultant dot net
if ($dbh = mysql_connect('localhost','root',''))
{
$strSQL = "select authorsname,bodytext from stories where id = $storyid";
mysql_select_db('mydb');
$stmt = mysql_query($strSQL, $dbh);
$row = mysql_fetch_array($stmt);
}
Compiled with MySQL
I get an error when I call "$row = mysql_fetch_array($stmt)" . The error is:
Supplied argument is not a valid MySQL result resource in .... on line 9.
This function worked perfectly in PHP 3.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Dec 06 23:00:01 2025 UTC |
I have the same problem. $db = mysql_connect("xxx", "xxx", "xxx") or die ("Sorry. mysql_select_db("name", $db); $SQL_statement = "SELECT * FROM iks WHERE voornaam= $naam"; $resultset = mysql_query($SQL_statement); while($data = mysql_fetch_array($resultset)){ echo $data['voornaam'] } But I'm sure that $naam has a value. Help me please!I have the same problem. $db = mysql_connect("xxx", "xxx", "xxx") or die ("Sorry. mysql_select_db("name", $db); $SQL_statement = "SELECT * FROM iks WHERE voornaam= $naam"; $resultset = mysql_query($SQL_statement); while($data = mysql_fetch_array($resultset)){ echo $data['voornaam'] } But I'm sure that $naam has a value. Help me please!