ctsql_end_of_fetch
Returns if there are more rows to fetch.
Declaration
bool ctsql_end_of_fetch ( resource QueryID )
Description
ctsql_end_of_fetch() indicates if there are more rows to fetch.
Returns
True if this is the last fetch; otherwise false.
Example
<?php
/* connect to database */
$link = ctsql_connect('ctreeSQL', 'admin', 'ADMIN');
if (!$link) {
die('Failed to connect to FairCom DB SQL: ' . ctsql_error());
}
/* this should return the correct numbers of deleted records */
ctsql_query('DELETE FROM mytable WHERE age < 50');
printf("Records deleted: %d\n", ctsql_affected_rows());
/* with a where clause that is never true, it should return 0 */
ctsql_query('DELETE FROM mytable WHERE 0');
printf("Records deleted: %d\n", ctsql_affected_rows());
?>
The above example would produce the following output:
Records deleted: 10
Records deleted: 0