Voting

: nine minus eight?
(Example: nine)

The Note You're Voting On

chew_baka at hotmail dot com
15 years ago
None of these examples were working for me, so I came up with the following silly procedure that gives me the number of rows. This example is crude, but you should get the idea.

<?php
$cxn
= odbc_connect("ODBC_DSN_NAME", "", "");
$sql = "SELECT * FROM some_table'";
$res = odbc_exec($cxn, $sql);
$items = 0;
while (
$row = odbc_fetch_array($res))
{
$items++;
}
odbc_free_result($res);
echo
"<br>total No. of rows: $items";
?>

<< Back to user notes page

To Top