ID: 5529
Comment by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Closed
Bug Type: MySQL related
Operating System: Windows NT4
PHP Version: 4.0 Release Candidate 2
New Comment:
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!
Previous Comments:
------------------------------------------------------------------------
[2000-07-12 08:59:57] [EMAIL PROTECTED]
buggy bug report, close it
------------------------------------------------------------------------
[2000-07-12 08:48:21] [EMAIL PROTECTED]
Sorry. My sql statement was wrong. The variable $storyid had no value
hence ...
------------------------------------------------------------------------
[2000-07-12 08:38:36] [EMAIL PROTECTED]
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.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=5529&edit=1