php script returning NULL for value
Posted by:
David Wnek
Date: January 13, 2012 01:00PM
Im using a simple php webservice to connect to my database. It holds some fairly large fields(.5-2 megs) When i run the query in cmd on the server it pulls the entire field just fine. However while using my script the field returns as NULL. I cant figure out if it's a mysql packet setting, or a php setting?
Any help is greatly appreciated.
Here is my script:
mysql_connect($host, $user, $pass) or die(mysql_error());
mysql_select_db($base) or die(mysql_error());
error_reporting(1);
$query = $_GET['query'];
$result = mysql_query($query)or die(mysql_error());
$rows = array();
while($r = mysql_fetch_assoc($result))
{
$rows[] = $r;
}
print json_encode($rows);
Subject
Views
Written By
Posted
php script returning NULL for value
5111
January 13, 2012 01:00PM
1434
January 15, 2012 02:39AM
1377
January 16, 2012 01:47PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.