Delicious Bookmark this on Delicious Share on Facebook SlashdotSlashdot It! Digg! Digg



PHP : Function Reference : SESAM Database Functions : sesam_fetch_row

sesam_fetch_row

Fetch one row as an array ()
array sesam_fetch_row ( string result_id [, int whence [, int offset]] )

Example 2215. SESAM fetch rows

<?php
$result
= sesam_query("SELECT * FROM phone\n" .
                     
"  WHERE LASTNAME='" . strtoupper($name) . "'\n" .
                     
"  ORDER BY FIRSTNAME", 1);
if (!
$result) {
   
/* ... error ... */
}
// print the table in backward order
echo "<table border=\"1\">\n";
$row = sesam_fetch_row($result, SESAM_SEEK_LAST);
while (
is_array($row)) {
   echo
"<tr>\n";
   for (
$col = 0; $col < $row["count"]; ++$col) {
       echo
"<td>" . htmlspecialchars($row[$col]) . "</td>\n";
   }
   echo
"</tr>\n";
   
// use implied SESAM_SEEK_PRIOR
   
$row = sesam_fetch_row($result);
}
echo
"</table>\n";
sesam_free_result($result);
?>

Change Language


Follow Navioo On Twitter
sesam_affected_rows
sesam_commit
sesam_connect
sesam_diagnostic
sesam_disconnect
sesam_errormsg
sesam_execimm
sesam_fetch_array
sesam_fetch_result
sesam_fetch_row
sesam_field_array
sesam_field_name
sesam_free_result
sesam_num_fields
sesam_query
sesam_rollback
sesam_seek_row
sesam_settransaction
eXTReMe Tracker