note 31585 deleted from function.ifx-fetch-row by didou

From: Date: Sat, 03 Feb 2007 03:46:46 +0000
Subject: note 31585 deleted from function.ifx-fetch-row by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-122638@lists.php.net to get a copy of this message
Note Submitter: dorn at bakcommunications dot com ---- 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>

« previous php.notes (#122638) next »