Home > Backend Development > PHP Tutorial > PHP code to connect to ODBC_PHP tutorial

PHP code to connect to ODBC_PHP tutorial

WBOY
Release: 2016-07-13 17:34:10
Original
889 people have browsed it

I don’t know how far I can go in my IT career. In the future, I won’t make gains or losses based on temporary skills. I can learn as much as I can based on my own interest....

This is a PHP connection ODBC example (copied), ODBC still needs to be set up, be careful to select the system DSN, a colleague said that the performance of using ODBC is not very good! Whatever the hell....

/*This example is a demonstration of using PHP4 to access database operations through ODBC*/
?>




Registered Member List - Database Access via ODBC Demo




Register as a member list







< ; td width="5%" align="center" valign="bottom">Gender





//Connect to ODBC database
$myconn=odbc_connect("phptest","sa","etc");
$strSql=" select * from reguser";
/*Execute query*/
$result=odbc_do($myconn,$strSql);
//Boolean odbc_fetch_row(integer result,integer row)
while(odbc_fetch_row ($result))//Read the data content through loop
{
?>






< td align="center">


}
//Close the connection to the database
odbc_close($myconn);
? > ;
ID Name AgeContact numberEmailHome address
< ? echo odbc_result($result,1)?>


www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/508514.htmlTechArticleI don’t know how long my IT road can go. Interested, learn as much as you can... This is an example of using PHP to connect to ODBC (copied), ODBC also needs to be set up...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template