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 DemoRegister as a member list
ID |
Name |
< ; td width="5%" align="center" valign="bottom">Gender
Age |
Contact number |
Email |
Home address |
//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
{
?>
< ? echo odbc_result($result,1)?> |
|
|
|
|
< td align="center">
|
}
//Close the connection to the database
odbc_close($myconn);
? > ;
http://www.bkjia.com/PHPjc/508514.htmlwww.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...