PDA

View Full Version : getting query results as an arrya


Lionel
05-08-2006, 03:28 PM
Hi, I am trying to get the below query to display as an array like
$getdivs=array('0011','0010');

but
$getdivs=array($distinct['divid']);
returns only one value. Please how can the below query be fixed?

Thank you


$alldivs = $DB_site->query("SELECT divid FROM cclpinternational_predictions WHERE gameover = '1'");
while ($distinct=$DB_site->fetch_array($alldivs)) {

$getdivs=array($distinct['divid']);
}
foreach ($getdivs as $v)
{ ......

Code Monkey
05-09-2006, 02:55 AM
$getdivs[] = $distinct['divid'];

Lionel
05-09-2006, 12:41 PM
Thanks, I appreciate the help.