$ my_db = new db_sql (); $ my_db-> connect ($ db_table, $ db_host, $ db_user, $ db_psw); $ = "select * from` Guestbook` "; $ my_db-> query ($)); if ($ my_db-> num_rows ()> 0) {echo "no record";} else {while ($ my_db-> next_record ()) {.......}}
(1) Query ($ query_string): Execute SQL instructions
(2) Next_Record (): Move the indicator to the next information, if the return value is false, the representative indicator has ended.
(3) Num_ROWS (), NF (): Two instructions are the same, and the SQL collapsed in this time.
(4) Affected_rows (): Recurns because INSERT, UPDATE or DELTE affects a few materials
(5) Num_fields (): Remove the number of fields that the SQL instruction capture
(6) f ($ field): Remove the column name to $ field information
(7) Seek ($ POS): Move the data indicator, similar file processing, SEEK ()
(8) Link_id (): Removed code with the database connection