Raised This Month: $ Target: $400
 0% 

Return rows


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Kiske
Veteran Member
Join Date: May 2009
Old 10-18-2010 , 22:19   Return rows
Reply With Quote #1

What consulte must be done in a plugin to give me back the number of rows that were obtained ?.

Example in PhpMyAdmin:
PHP Code:
SELECT `nick`, `d4FROM `table6ORDER BY `d4DESC
Showing rows 0 - 29 (1,499 total, Query took 0.0191 sec)

This number: 1,499
How do get in a Plugin ?.


Sory for my english.
__________________

Kiske is offline
Send a message via Skype™ to Kiske
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 10-18-2010 , 22:29   Re: Return rows
Reply With Quote #2

If you execute that query, you can just use SQL_NumResults().
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Kiske
Veteran Member
Join Date: May 2009
Old 10-18-2010 , 22:36   Re: Return rows
Reply With Quote #3

Thanks, i did not think.
__________________

Kiske is offline
Send a message via Skype™ to Kiske
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 10-19-2010 , 00:17   Re: Return rows
Reply With Quote #4

Or if you ONLY want to get the number of rows and not the values, this will be more efficient:
Code:
SELECT COUNT(*) FROM `table6`
__________________
Hunter-Digital is offline
Kiske
Veteran Member
Join Date: May 2009
Old 10-19-2010 , 08:27   Re: Return rows
Reply With Quote #5

Quote:
Originally Posted by Hunter-Digital View Post
Or if you ONLY want to get the number of rows and not the values, this will be more efficient:
Code:
SELECT COUNT(*) FROM `table6`
Yes, thanks again.
__________________

Kiske is offline
Send a message via Skype™ to Kiske
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:17.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode