I am having problems getting the information out of an array after using mysql_fetch_array.
The query is successful and all the fields in each records have information in them.
But there are a couple items in the array that even though I can verify that the fields are all populated using the MYSQL command line. When I use mysql_fetch_array some of the fields in the record do not have information.
I'm not using anything fancy in the code......
db_connect();
$query = "SELECT id,lname,fname,add1,city,achpho,acwpho,accpho,achpho,nowpho,nocpho,clno FROM customer WHERE (".$_SESSION['query_act'].")";
$result = mysql_query($query)
or die ("query didn't run");
while ($row = mysql_fetch_array($result))
{
/ PROCESSING GOES HERE /
}
I've tried using both the field name $row['state'] or the numeric equivalent $row[6] and both print blank on every record in the database.
I've tried transferring to a regular string variable but still I get empty data.
I've been able to determine that the fields that do not have data all have a NULL value, even though I have verified at the MYSQL system prompt they contain data.
This is running on a Fedora Linux server using PHP 5.2.6 and MYSQL 5.0.67
All the fields I am working with are VARCHAR of varying lengths.
Thanks in advance for any help you can provide.
Vilmos