Re: Multiple rows returned ?. . .
| From: | Ivo Stoykov | Date: | Wed, 14 Mar 2001 21:33:28 +0000 |
| Subject: | Re: Multiple rows returned ?. . . | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-7487@lists.php.net to get a copy of this message | ||
Why don't you try wqith <while> cicle?
""Mrvball008"" <mrvball008@hotmail.com> wrote in message
news:OE6620N39x6HHGNZ4mF00003ccd@hotmail.com...
> Hi I have little tiny script like so..
>
> ---------
> <?
> $dbName = "somedb";
> $dbPass = "somepass";
> $dbUserName = "someuser";
> $host = "localhost";
> $db = mysql_connect($host, $dbUserName, $dbPass) or die ("Could not
connect
> to database");
> mysql_select_db($dbName,$db);
> $sql = "SELECT * FROM downloads";
> $result = mysql_query($sql, $db);
> $row = mysql_fetch_array($result);
> $row1 = mysql_fetch_array($result);
> ?>
> -----------
>
> no I know there has to be a more efficient way of returning the $row and
> $row1 without writing it down like so..
>
> anyone one can throw me a clue? :)
>
> Thank
>
>
> Andre
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> For additional commands, e-mail: php-db-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>