Re: Parsing recordsets - only first row returned
| From: | John W. Holmes | Date: | Thu, 18 Mar 2004 19:26:52 +0000 |
| Subject: | Re: Parsing recordsets - only first row returned | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-180894@lists.php.net to get a copy of this message | ||
From: "Alex Hogan" <Alex.Hogan@AlliedElec.com>
> I am parsing data returned from a field that looks like this;
>
> 6-8-3-5-10-9-6__7-5-9--etc...
Wow... you're totally missing the point of a database when you store data
like this.
> The code below parses out the data they way I want it but only returns the
> first row. I need to compare all rows and return an average from each of
> the parsed out numbers. Where have I made a mistake?
>
>
>
> $i = 0;
>
> $total = array();
>
> while($row = mssql_fetch_array($result)){
So how many times does the while() loop execute? How many rows is your query
actually returning? What does the output actually look like and what should
it look like.
---John Holmes...