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



PHP : Function Reference : SESAM Database Functions : sesam_fetch_array

sesam_fetch_array

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

Example 2214. SESAM fetch array

<?php
$result
= sesam_query("SELECT * FROM phone\n" .
                     
"  WHERE LASTNAME='" . strtoupper($name) . "'\n".
                     
"  ORDER BY FIRSTNAME", 1);
if (!
$result) {
   
/* ... error ... */
}
// print the table:
echo "<table border=\"1\">\n";
while ((
$row = sesam_fetch_array($result)) && count($row) > 0) {
   echo
"<tr>\n";
   echo
"<td>" . htmlspecialchars($row["firstname"]) . "</td>\n";
   echo
"<td>" . htmlspecialchars($row["lastname"]) . "</td>\n";
   echo
"<td>" . htmlspecialchars($row["phoneno"]) . "</td>\n";
   echo
"</tr>\n";
}
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