php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19403 Query unexpected error - Not a valid resutl...
Submitted: 2002-09-14 08:20 UTC Modified: 2002-09-14 17:32 UTC
From: jackrap at tin dot it Assigned:
Status: Not a bug Package: MySQL related
PHP Version: 4.2.3 OS: Windows XP
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: jackrap at tin dot it
New email:
PHP Version: OS:

 

 [2002-09-14 08:20 UTC] jackrap at tin dot it
I've installed MySQL 3.23.28 and PHP 4.2.3.
After execution of a Query PHP says : "Mysql...is not a valid result..."

Latest version I used of PHP is 4.1.3 and this error doesn't occur.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-09-14 09:16 UTC] derick@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.

 [2002-09-14 11:24 UTC] jackrap at tin dot it
I explain another time my problem:

i'm using php 4.2.3 with mysql 3.32.28

my PHP CODE:
$sql = "SELECT * FROM mytable";
$result = mysql_query($sql,$connection);

and PHP output is:
Warning: Supplied argument is not a valid MySQL result resource in c:\myfile.php on line 5

With PHP 4.1.3 this error doesn't occur, using the same PHP code
 [2002-09-14 11:56 UTC] jackrap at tin dot it
...in particular this code generates error :

mysql_fetch_row($result);

and

mysql_num_rows($result);
 [2002-09-14 13:08 UTC] derick@php.net
What does "echo mysql_error();" show if you execute it just after the mysql_query() call?

Derick
 [2002-09-14 15:23 UTC] georg@php.net
Currently, we have 3.23.x in the 3-tree, 3.32 is science fiction!

Please provide enough information for this possible error:
"Enough information" includes:
a) a "create table statement or a describe table output
b) mysql_errno return codes after mysql_query



 [2002-09-14 17:13 UTC] jackrap at tin dot it
Problem resolved!
The problem wasn't MySQL but null value of variables passed by URL.....and now it is a new problem ;-)
 [2002-09-14 17:32 UTC] jackrap at tin dot it
The directive " register_globals = Off " in php.ini causes null value variables passed via URL and so MySQL doesn't work.
Now it's allright.
Thank you to All.
Bye Bye
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jun 29 07:01:31 2024 UTC