php通过数组存取mysql查询语句的返回值

php通过数组存取mysql查询语句的返回值

1、示例1

$res = mysql_query($mysqli, $sql) or die(mysql_error($mysql));

$a=array();

while ($row=mysql_fetch_array($result))

{

$d= new Department();

$d->value=$row['num'];

$a[]=$d;

}

print_r($a);

原文

http://zhidao.baidu.com/question/389512271.html

http://topic.csdn.net/u/20100127/14/8bac780b-63b2-416d-bdf1-6027d50f17b7.html

posted @ 2012-10-16 23:56  浪里飞  阅读(2943)  评论(0编辑  收藏  举报