Re: correct syntax.. ?
| From: | Oyvind Gronnesby | Date: | Wed, 28 Jun 2000 11:21:02 +0000 |
| Subject: | Re: correct syntax.. ? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-3534@lists.php.net to get a copy of this message | ||
Eric Porter,
> I am trying to find the total of items sold,
> but I have a problem with my mysql_fetch.
> I never tried to retrieve just one item from the
> table before. The table/where clause work fine.
>
> $query0 = "select SUM(quantity) from
> inventorysold where name = '$row[name]' ";
> $result1 = mysql_query($query0);
>
> $row1 = mysql_fetch_*what goes here?*($result1);
mysql_fetch_array if you want an associative array.
mysql_fetch_row if you want the data as a normal array.
You should take a look at:
http://www.php.net/manual/ref.mysql.php
--
Øyvind Grønnesby
"Wow, I had knowledge!"
--Buffy