Re: mysql_num_rows
| From: | Joe Stump | Date: | Wed, 29 Nov 2000 07:19:01 +0000 |
| Subject: | Re: mysql_num_rows | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-27783@lists.php.net to get a copy of this message | ||
Try an @mysql_num_rows($result) - I'm grabbing really...
--Joe
On Wed, Nov 29, 2000 at 09:09:13AM +0200, Lauri Vain wrote:
> Hello,
> Please check out my code below. Yes, I know it's not very pretty at this stage
> but I need to deliver an example of how it'll work really soon (few hours).
>
>
> ******************************** SNIP ********************************
> $viewposts="SELECT * FROM kiba_trade_offer WHERE
> ((trade_messtype='parent')&&(trade_viewtype='public')";
> if($filter != ""){
> if($types != ""){
> if(($types == "buy")||($types == "sell")||($types ==
> "biz")){$viewposts .=
> "&&(trade_type='$types')";};
> };
> if($levels != ""){
> if(($levels == "public")||($levels == "agents")){$viewposts .=
> "&&(trade_viewtype='$levels')";};
> };
> };
>
> $viewposts .= ") ORDER BY trade_id DESC;";
>
> $results=mysql_query($viewposts);
> $loendur = mysql_num_rows($results);
> echo ("--- $numofrows ---");
>
> while ($myrow = mysql_fetch_array($results)) { / . . . show the results . .
> . /}
> ******************************** SNIP ********************************
>
> Now, the while loop gives me five rows. What's wrong, the mysql_num_rows
> doesn't print anything, not even a zero?
>
>
> Thanks,
> Lauri Väin
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
================================================================================
= Joe Stump joestump98@yahoo.com http://www.miester.org =
================================================================================
Need a programmer? http://www.google.com/search?q=joe+stump+resume