我想根据数组获取mysql结果。
我有这段代码,但它带来一个结果并重复它,我想要所有结果
$connectdb = mysql_connect('localhost','root','') or die('nonno');
$selectdb = mysql_select_db('test',$connectdb) or die('fofofo');
$se_right = mysql_query("select * from ads ") or die(mysql_error());
$row = mysql_fetch_object($se_right);
$array = array(
"id" => $row->id,
"name" => $row->adsurl
);
$se_ridght = mysql_query("select * from ads ") or die(mysql_error());
while($roww = mysql_fetch_object($se_ridght))
{
foreach($array as $key =>$results)
{
echo $key.':'.$results.'<br />';
}
}