最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
php 连接数据库并显示所要的数据
时间:2022-06-24 19:13:34 编辑:袖梨 来源:一聚教程网
| 代码如下 | 复制代码 |
|
$Host="localhost"; $MySQL_UserName="root"; $MySQL_UserPass="password"; $MySQL_Database="db"; $Query="SELECT * FROM domain"; if (!mysql_connect ($Host, $MySQL_UserName, $MySQL_UserPass)){ print "Cannot connect to MySQL: ".mysql_error(); exit; } if (!mysql_select_db ($MySQL_Database)){ print "Cannot select db exit; } if (!$Result_ID=mysql_query ($Query)){ print "Query Error: ".mysql_error(); exit; } while ($Result=mysql_fetch_row($Result_ID)){ print "------------------ print "$Result[0] print "$Result[1] print "$Result[2] print "$Result[3] print "------------------- }?> |
|
相关文章
- 羞羞漫画登录页-羞羞漫画首页登入口 03-27
- 2024支付宝7月9日小鸡答题今日答案 03-27
- 樱花动漫app最新版本下载安装-樱花动漫正版app官方入口下载 03-27
- 漫蛙漫画(Manwa2)最新镜像直连地址是什么 03-27
- pubg地铁逃生官网入口最新-pubg地铁逃生官网直达链接 03-27
- QQ邮箱入口在哪 03-27