Re: Row Count

From: Date: Tue, 10 Jun 2008 19:51:37 +0000
Subject: Re: Row Count
References: 1 2 3 4 5 6 7 8 9  Groups: php.general 
Request: Send a blank email to php-general+get-275208@lists.php.net to get a copy of this message
Dan Shirah wrote:
Sorry about the top posting. <slaps hand> You my friend are a genious! $rows = $rowcount['(count(*))'] works like a charm! Thank you all.
So in your query, add this SELECT COUNT(*) as total FROM your_table Then in your code use this instead $rows = $rowcount['total']; This makes a little more sense then using the count(*) thing, to me at least -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them." Twelfth Night, Act II, Scene V by William Shakespeare

« previous php.general (#275208) next »