Bug #50160 [NoF->Bgs]: Not Recieving Data From DB
| From: | andrey@php.net | Date: | Wed, 18 Aug 2010 10:27:08 +0000 |
| Subject: | Bug #50160 [NoF->Bgs]: Not Recieving Data From DB | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-153555@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=50160&edit=1
ID: 50160
Updated by: andrey@php.net
Reported by: arrshadowman at msn dot com
Summary: Not Recieving Data From DB
-Status: No Feedback
+Status: Bogus
Type: Bug
Package: MySQL related
Operating System: Windos XP PRO SP3
PHP Version: 5.2.11
Block user comment: N
New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions. Due to the volume
of reports we can not explain in detail here why your report is not
a bug. The support channels will be able to provide an explanation
for you.
Thank you for your interest in PHP.
Previous Comments:
------------------------------------------------------------------------
[2009-11-20 01:00:03] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
------------------------------------------------------------------------
[2009-11-12 21:40:10] jani@php.net
This page has very good example, try it out:
http://www.php.net/manual/en/function.mysql-fetch-assoc.php
The mysql errors should explain you why it fails. Then we can bogus this
report since there really isn't any bug here..
------------------------------------------------------------------------
[2009-11-12 19:16:15] arrshadowman at msn dot com
As instructed in the email, I attempted the var_dump($row) it returns
'bool(false)'. which is what I thought, it isn't returning anything. The
mysql_ping($con) is returning true, so it's connecting without errors,
but not excepting anything back from the call. According to the
'php.ini' setting that php error log is ON, but has no file name. PHP
was installed using the Windows installer for IIS from the www.php.net
website for non-threading so the installation was by the default
settings. The MySQL COMMAND LINE CLIENT currently is the only access I
have to the database. I was hoping to be able to test my website on this
developer PC I setup, before uploading it, but this problem is holding
me up. I search all over the web for settings advice but didn't find
much. But the strange part is that most of the php mysql functions are
working except for mysql_query. I'm at a loss.
------------------------------------------------------------------------
[2009-11-12 17:36:13] jani@php.net
Try to var_dump($row); instead to see what it contains, if nothing. And
check your error log for any possible errors/warnings/notices. (assuming
you have setup PHP properly to put all those in an error log file..)
------------------------------------------------------------------------
[2009-11-12 17:18:35] arrshadowman at msn dot com
Description:
------------
I'm running a developer setup on my PC. PHP 5.211 and MySQL 5.1 with
Windows IIS. For some reason I can run direct queries on the MySQL
Command Line Client, but using PHP in IE and FireFox, the query does
send anything back. It connects to the database, as the ID counter
increments everytime I load the page, but the table data returns
nothing.
Reproduce code:
---------------
---
From manual page: function.mysql-query#Return Values
---
$con = mysql_connect("localhost","root@localhost","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("nsc_db", $con);
$result = mysql_query("SELECT * FROM emails", $con);
while ($row = mysql_fetch_array($result));
{
echo
$row['fname']."<BR>".$row['lname']."<BR>".$row['address']."<BR>".$row['age'];
}
Expected result:
----------------
The full list from table 'emails'.
Actual result:
--------------
nothing but the <BR> carriage returns.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=50160&edit=1