Jump to content
  • 0
Sign in to follow this  
Oceanid

Too many columns, discarding last 1 column [Solved]

Question

I made a script to look up a players account information but it only works when I type in my own character name. For anyone else the map server displays the "Too many columns, discarding last 1 column" error. It can't seem to find the account id so it defaults to 0 and can't pull any of the account information. Anyone know why this is?

 

This is the bit of code that checks for a matching account id in the db:

 

if(!query_sql("SELECT `account_id` FROM `login` WHERE `account_id` ='"+getcharid( 3,.@name$ )+"'")) {
		mes "[Account Manager]";
		mes "There is no character matching " +.@name$+ ".";
		mes "Would you like to re-enter the name?";
		switch(select("Yes:No")) {
			case 1:
				callsub CHARACTER;
				next;
			case 2:
				close;
		}
	}

 

Edited by Oceanid

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

query_sql requires you to pass variables for every coloumn that you want selected. so try 

if(!query_sql("SELECT account_id ...",.@accountId)) { // parse };

Share this post


Link to post
Share on other sites

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.