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

原文地址:https://www.cnblogs.com/mydomain/p/2727009.html