Raised This Month: $ Target: $400
 0% 

[CSS] SQL Init


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
delachambre
AlliedModders Donor
Join Date: Jan 2011
Location: France
Old 08-13-2012 , 10:49   [CSS] SQL Init
Reply With Quote #1

Hello,

Code:
public Action:Initiative(Handle:timer)
{
	decl String:query[300];
	
	new Handle:Get;
	
	new i = 1;
	while (i > 0 && i <= 12)
	{
		Format(query, sizeof(query), "SELECT capital FROM `Roleplay_Job` WHERE `id` = %i", i);
		Get = SQL_Query(db_rp, query);
		
		if (Get)
		{
			while (SQL_FetchRow(Get))
			{
				capital[i] = SQL_FetchInt(GetCapital, 0);
			}
			
		}
		
	}
	CloseHandle(Get);
}
Why when I create a virtual I, it only takes into account that two and two?

For example

1 is ok
2 isn't ok
3 is ok
4 isn't ok

...


etc..

Sorry for my bad English, i'm French.

Thanks in advance.
__________________
♥ 𝕊ℙ𝕒𝕨𝕟 𝔻𝕖𝕧𝕖𝕝𝕠𝕡𝕖𝕣 [ℂ𝕊:𝕊] ♥

Clan-Nemesis

Last edited by delachambre; 08-13-2012 at 10:49.
delachambre 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 12:48.


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