Jump to content
  • 0
Sign in to follow this  
Virtue

Quick SQL query question

Question

Hi All,

I need help with a quick SQL query script.

-    script    testcharname#Testserver    FAKE_NPC,{

OnInit:
bindatcmd("testingname","testcharname#Testserver::OnTestName",99);

OnTestName:
mes "GO";
input .@name$;
next;
query_sql "SELECT charid,name FROM `char` WHERE `name` = "+.@name$,.@charid,.@gname$;
    if(.@gname$ == .@name$){
    mes "Hey";
    dispbottom ("["+.@charid+"]",0x00FA9A);
    close;
    } else {
    mes "Hoy";
    dispbottom ("Character doesn't exist.",0x00FA9A);
    close;
    }
}

I need to get results if the input is valid, if not will display "character doesn't exist". Got no errors on script checker but script doesn't proceed. I think there's something wrong with my query and I'm not getting results

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.