Data | Database Open Database Connectivity (ODBC) has become an industry standard for communicating with databases. PHP also provides a standard interface that enables PHP to invoke databases such as Access,sql server. The related functions are:
Gets a row of data from a result set. The row argument is optional and, if it is vacant, returns the next valid row. Returns False when no longer is remaining in the result set.
(4) Boolean odbc_close (integer connection)
Closes a connection to a database. If there is an open transaction on the connection, an error is returned and the connection is not closed.
Finally, look at the pagination example:
?
Set the number of display bars per page
$show _num = 10;
$spages = $pages;//Avoid $pages later changes
Defining connections
$dsn = "localhost";
$user = "sa";
$password = "";
Calculate the total number of records
$rs _num = "SELECT count (*) as ID from BBS where zu= ' 0 ' and lei= '". $lei. "'";
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.