Raised This Month: $ Target: $400
 0% 

SQL_GetRowCount


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
IceCucumber
Member
Join Date: Dec 2011
Old 05-12-2015 , 15:16   SQL_GetRowCount
Reply With Quote #1

Hey. I'm running into some confusion with SourceMod's SQL_GetRowCount.

I'm able to create tables, insert/update data etc. But the following code always returns 1:
PHP Code:
// Get number of rows in table "competitive_overlay"
new Handle:hSQL_RowCount SQL_Query(g_hSQL"SELECT COUNT(*) FROM `competitive_overlay`;");
new 
rowCount SQL_GetRowCount(hSQL_RowCount);
CloseHandle(hSQL_RowCount);
PrintToServer("Row count: %i"rowCount); // This is always 1 
Running "SELECT COUNT(*) FROM `competitive_overlay`" directly in the SQL server returns the actual row count just fine. Am I doing something wrong here?
IceCucumber is offline
 



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 06:42.


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