1 Star 0 Fork 0

devouty/linux_5_php

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
main.php 711 Bytes
一键复制 编辑 原始数据 按行查看 历史
devouty 提交于 2015-05-03 13:23 +08:00 . first&&last commit
<?php
//
$userName = "devouty";
$password = "quan2413";
$databaseName = "testdb";
$databaseTable = "linuxtest";
$conn=MySQL_connect("localhost",$userName,$password) or die("connect error:".mysql_error());
echo("Useing mysql,database".$databaseName.",user ".$userName.",table ".$databaseTable);
MySQL_select_db($databaseName);
$result = MySQL_query("select * from ".$databaseTable,$conn);
echo "<table border=1><tr>";
while($field = MySQL_fetch_field($result))
{
echo "<td>$nbsp".$field->name."&nbsp;</td>";
}
echo "</tr>";
while($rows = MySQL_fetch_row($result))
{
echo "<tr>";
for($i = 0;$i < count($rows); $i++)
echo "<td>$nbsp".$rows[$i]."</td>";
}
echo "</tr></table>";
?>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/devouty/linux_5_php.git
git@gitee.com:devouty/linux_5_php.git
devouty
linux_5_php
linux_5_php
master

搜索帮助