PHP如何把sql数据库中两个字段的值横排显示在网页
1个回答
展开全部
<?$dbh = @mysql_connect("localhost:3306","root","9999");@mysql_select_db("ok", $dbh);$q = "SELECT * FROM abc";$rs = mysql_query($q, $dbh);while($row = mysql_fetch_array($rs)) echo "$row[id] $row[name] ";@mysql_close($dbh);?>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询