http://php.net/array

Try $data = mysql_fetch_assoc($series)

This will produce an associative array with column names attached to
values for one row
of data from your database.

jim

>Hi,
>
>im trying to fill a chart with some data.
>
>I am using a mysql query:
>$query = "SELECT serie_tot, COUNT(*) FROM statistik WHERE shooter='mindbash'
>GROUP BY serie_tot";
>$series = mysql_query($query)
>
>It returns the results i want, ie
>value - count
>value2 - count
>etc...
>
>Now - i am trying to get this data into an array and is using:
>$data = mysql_fetch_array($series);
>
>But that doesn´t work! If i do it manually:
>$data = array(
>"value" => 4,
>"value2" => 2);
>
>...it works like a charm. What´s the difference between these arrays?
>
>I would also, very much, appreciate a tip on where i could learn how to
>master arrays. I am tearing my hair out here.
>
>Regards
># Daniel Alsén    | www.mindbash.com #
># [EMAIL PROTECTED]  | +46 704 86 14 92 #
># ICQ: 63006462   | +46 8 694 82 22  #
># PGP: http://www.mindbash.com/pgp/  #
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


--
Jim Musil
---------
Multimedia Programmer
Nettmedia
-------------
212-629-0004
[EMAIL PROTECTED]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to