546 CHAPTER 22 SQLITE (Yahoo web space) The sqlite_num_rows() function

546 CHAPTER 22 SQLITE The sqlite_num_rows() function returns the number of rows located in the result_set. An example follows: “; sqlite_close($sqldb); ?> This returns: Total rows returned: 3 sqlite_changes() int sqlite_changes (resource dbh) The sqlite_changes() function returns the total number of rows affected by the most recent modification query. For instance, if an UPDATE query modified a field located in 12 rows, then executing this function following that query would return 12. Manipulating the Result Set Pointer Although SQLite is indeed a database server, in many ways it behaves much like what you experience when working with file I/O. One such way involves the ability to move the row pointer around the result set. Several functions are offered for doing just this, all of which are introduced in this section. sqlite_current() array sqlite_current (resource result [, int result_type [, bool decode_binary]]) The sqlite_current() function is identical to sqlite_fetch_array()in every way except that it does not advance the pointer to the next row of the result set. Instead, it only returns the row residing at the current pointer position. If the pointer already resides at the end of the result set, FALSE is returned. sqlite_has_more() boolean sqlite_has_more (resource result_set) The sqlite_has_more()function determines whether the end of the result_set has been reached, returning TRUE if additional rows are still available, and FALSE otherwise. An example follows:
You need excellent and relaible webhost company to host your web applications? Then pay a visit to Inexpensive Web Hosting services.

Leave a Reply