标签:hid row connect logs mes fetch log nec 函数
<?php
$link = @mysql_connect(‘localhost‘,‘root‘,‘‘);
mysql_query(‘use test‘,$link);
mysql_query(‘set names utf8‘,$link);
$res = mysql_query(‘select * from boy‘);
//var_dump($res);
print_r(mysql_fetch_assoc($res));
//>>>Array ( [hid] => A [bname] => 屌丝 )
//>>>返回关联数组
print_r(mysql_fetch_row($res));
//>>>Array ( [0] => B [1] => 杨过 )
//>>>返回索引(数字)数组
print_r(mysql_fetch_array($res));
//>>>Array ( [0] => C [hid] => C [1] => 陈冠希 [bname] => 陈冠希 )
//>>>返回索引数组和关联数组的集合
?>
标签:hid row connect logs mes fetch log nec 函数
原文地址:http://www.cnblogs.com/darkalex001/p/7529913.html