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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Wed Jan 15 15:01:31 2025 UTC