note 31585 added to function.ifx-fetch-row
| From: | dorn at bakcommunications dot com | Date: | Sun, 27 Apr 2003 01:56:58 +0000 |
| Subject: | note 31585 added to function.ifx-fetch-row | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-47158@lists.php.net to get a copy of this message | ||
Simple example of fetching rows for data results:
<html>
<?php
$database = "xxx";
$host = "yyy";
$user = "username";
$pass = "password";
if (!$connect_id = ifx_connect("$database@$host", $user, $pass)) {
echo "Unable to connect to Informix Database\n";
exit();
}
$sql = "select customer, quantity from order";
$result = ifx_query($sql, $connect_id) or die ("couldn't execute the query");
?>
<table>
<tr>
<?php
while ($row = ifx_fetch_row($result)) {
echo "<td>".$row['customer']."</td>";
echo "<td>".$row['quantity']."</td>\n";
}
ifx_free_result($result);
ifx_close($connect_id);
?>
</tr>
</table>
</html>
--
http://www.php.net/manual/en/function.ifx-fetch-row.php
http://master.php.net/manage/user-notes.php?action=edit+31585
http://master.php.net/manage/user-notes.php?action=delete+31585
http://master.php.net/manage/user-notes.php?action=reject+31585