AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   MySql l Oh My God What The F*ck (https://forums.alliedmods.net/showthread.php?t=89313)

DaxProxy 04-04-2009 18:22

MySql l Oh My God What The F*ck
 
MySql
Like, ive wasted my whole day...just trieing to figure out one damn thing.

PHP Code:

public kood_vip(id,level,cid)
{
new 
name[32]
new 
punktid
new fResult
new gResult
        result 
dbi_query(sql,"SELECT punktid FROM ur_users WHERE name = 'Fire'")
        
gResult dbi_result(result"punktid"fResult)
        if(
gResult >= 50)
{
        
console_print(id"Wiiii")
        
console_print(id"%s",gResult)
}
else
{
    
console_print(id"Stfu!")
        
console_print(id"%s",gResult)
}


I have database table ur_users table, riight. In that i have column named to "punktid", riight. Now i WANT to get PLAYER's value of "punktid"...but how on earth am i going to DOOO THAT?

Im like...going nut's here.

In php, it's simple...but in Pawn it's impossiple? Fuuk :D

Sorry for my language but with every faulty compile, ive been banging my keyboard onto my monitor...it's making me craaazy.

I've got another question too.

PHP Code:

result dbi_query(sql,"SELECT %s FROM ur_users WHERE user = '%s'"punktiduser

That's another wtf thing. I mean...how can i define %s? So %s means "punktid" and user at once? That language is wieerd.


All times are GMT -4. The time now is 02:27.

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