php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11370 Warning: Supplied argument is not a valid MySQL result resource in...line 16
Submitted: 2001-06-08 16:38 UTC Modified: 2001-06-09 01:40 UTC
From: a dot naef at condor-communications dot com Assigned:
Status: Not a bug Package: MySQL related
PHP Version: 4.0.5 OS: Windows 2000
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: a dot naef at condor-communications dot com
New email:
PHP Version: OS:

 

 [2001-06-08 16:38 UTC] a dot naef at condor-communications dot com
<?php

$host = "localhost";
$user = "";
$pass = "";
$db = "andre";

$verbindung = mysql_connect($host, $user, $pass);

$sql = "SELECT name FROM test WHERE id='".$id."'";


$result = mysql_db_query($db,$sql);

while($row = mysql_fetch_array($result))  {
	echo htmlentities($row["name"]);
    
	}
mysql_close ($verbindung);

?>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-09 01:40 UTC] sniper@php.net
works for me just fine. Check your permissions and also
try adding 'echo mysql_error();' lines after the mysql_db_query() and you'll get more info what goes wrong
there. Most likely not enough permissions or the db name is wrong or..Anyway, not a bug in PHP.

--Jani

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 23:01:27 2024 UTC