落伍者站长论坛's Archiver

hotworm 发表于 2008-11-19 17:26

弄了一个mysql数据库,想请人写一段小代码

就一个表,有三个字段,分别是:  ID 、 Category 、 News
怎么才能调用出来数据

艾斯 发表于 2008-11-19 17:32

show me the money

GoogleSpider 发表于 2008-11-19 17:52

select 字段 from 表(刚才写了库)

sickog 发表于 2008-11-19 17:59

black sheep wall

血饮狂魔 发表于 2008-11-19 18:24

分不分页

血饮狂魔 发表于 2008-11-19 18:33

[code]<?php
$dbh = mysql_connect ("$db_host", "$db_username", "$db_password");
mysql_select_db ("$db_dbname");
$result = mysql_query ("SELECT * FROM 表名",$dbh);
while ($list = mysql_fetch_array ($result))
{
echo"
<table><tr>
<td>$list[ID]</td>
<td>$list[Category]</td>
<td>$list[News]</td>
<tr></table>
";
}
?>[/code]

[[i] 本帖最后由 血饮狂魔 于 2008-11-19 18:34 编辑 [/i]]

增普 发表于 2008-11-19 20:54

show me the money

在远方 发表于 2008-11-19 20:58

operation CWAL
power overwhelming
the gathering
game over man
noglues
staying alive
there is no cow level  
whats mine is mine
breathe deep
something for nothing  
black sheep wall
medieval man  
modify the phase variance
war aint what it used to be  
food for thought

今心 发表于 2008-11-19 20:59

show me the gas

页: [1]

Powered by Discuz! Archiver 6.1.0  © 2001-2007 Comsenz Inc.