Raised This Month: $ Target: $400
 0% 

SQL -Count rows


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
raggarlasse
New Member
Join Date: Aug 2013
Old 09-08-2013 , 23:47   SQL -Count rows
Reply With Quote #1

Hello, I need some help with some code.
I want to count the rows that equals a specific steamId.

This is what I've tried :
Code:
formatex(szTemp,charsmax(szTemp),"SELECT * FROM `log` WHERE Player = '%s'", szSteamId)
	SQL_ThreadQuery(g_SqlTuple, "returnValue",szTemp,Data,1);
returnValue
Code:
new asdf
	asdf=SQL_NumResults(Query)

Another idea how to solve this is to return the value of this string
Code:
SELECT COUNT(Player) FROM log WHERE Player = 'STEAM_0:0:19289143'

But what I want is a variable with the number of rows, a specific steamid appears in.

Last edited by raggarlasse; 09-08-2013 at 23:48.
raggarlasse 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 19:13.


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