Possible bug?
| From: | Brad Handy | Date: | Thu, 20 Jan 2000 17:32:09 +0000 |
| Subject: | Possible bug? | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-9321@lists.php.net to get a copy of this message | ||
I just got my php support for informix to actually connect to my database
server. After writing and small test script to grab some information about
myself like this:
<?PHP
Header("Content-type: text/html");
if($db_id = ifx_connect()) {
$query = "select id, login, beg_date, end_date from login_rec where
id = 182414";
if(! $qry_id = ifx_prepare($query, $db_id)) {
echo "Could not prepare query.";
exit();
} /* end if. */
if(! ifx_do($qry_id)) {
echo "Error executing the query.";
exit();
} /* end if. */
while( $data = ifx_fetch_row($qry_id, "CURRENT")) {
list($id, $login, $beg_date, $end_date) = data;
echo "${id} ${login} ${beg_date} ${end_date} <br>";
} /* end while */
} else {
echo "No Database Connection.";
}
?>
None of the information is printed out. It's all just empty strings. The
line breaks print out but nothing else. However when I rewrite the while
loop to this:
while($data = ifx_fetch_row($qry_id, "CURRENT")) {
for(reset($data); $value = current($data); next($data)) {
echo $value . " ";
} /* end for. */
echo "<br>";
} /* end while. */
All of the correct information is printed out. Can anyone explain this? I
have a pretty up to date version of the CVS. I just downloaded it today.
--Brad Handy