Hi,

it would have been easier to help you if you included some code snippet...

Use something like this:

$res = mysql_query ("SELECT COUNT(deptid) FROM maintenance GROUP BY
deptid");
$deptcount = array();   // reset the array
while ($row = mysql_fetch_row ($res)) {
  $deptcount[] = $row[0];
}


Thomas

> -----Ursprüngliche Nachricht-----
> Von: LSC Exhibits Department [mailto:[EMAIL PROTECTED]]
> Gesendet: Montag, 23. September 2002 19:17
> An: '[EMAIL PROTECTED]'
> Betreff: [PHP-DB] getting mysql_fetch_row into array
> 
> 
> Going through brain-lock here. From this query "Select 
> count(deptid) from
> maintenance group by deptid" ,I get 11 rows. What I need to 
> do is get an
> array like $a=array(315,11,43,67,415,32,25,63,93,46,76) from 
> this query, so
> that 
> $a[0]=315
> $a[1]=11
> $a[2]=43 
> and so on. The best I can get is ;
> $a[0][0]=315
> $a[0][1]=11
> $a[0][2]=43 and so on. Does anyone have any ideas???
> 
> John Coder
>   
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to