美文网首页
超简单数据库连接和查询

超简单数据库连接和查询

作者: 色可塞爱思 | 来源:发表于2018-03-07 17:56 被阅读0次
$db_apply = mysql_connect("localhost:3306", "root", "");
$table_apply=mysql_select_db("apply",$db_apply); 
$sql = "select * from ecs_apply";
$res = mysql_query($sql,$db_apply);
$rows=mysql_fetch_row($res);

显示:
Array
(
[0] => 1
[1] => 撒旦法
[2] => asdf
[3] => asdf
[4] => asdf
[5] => asdf
[6] => asdfasdf
[7] => 2013-10-11 16:14:47
)

相关文章

网友评论

      本文标题:超简单数据库连接和查询

      本文链接:https://www.haomeiwen.com/subject/bvsrfftx.html