Jump to content
  • 0

[Debug] Command SQL return notice in map-server


Hyroshima

Question


  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  159
  • Reputation:   58
  • Joined:  07/11/14
  • Last Seen:  

Hello again! xD

I'm having a problem when using the SQL SHOW command.

I created two columns in the login table and using the command below displays the following error:

query_sql "SHOW COLUMNS FROM `login` LIKE 'magic_shop%'",.@rtn$; return getarraysize(.@rtn$);

ERRO:

3232323.jpg.1d4885e856fcb21950ba98eaca44d4f9.jpg

 

Thank you very much xD ?

 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2346
  • Joined:  10/28/11
  • Last Seen:  

it return more than 1 field.

iuUM4Xm.png

 

you need to provide the array to store other fields that returned from the query.

query_sql("SHOW COLUMNS FROM `login` LIKE 'magic_shop%'", .@field$, .@type$, .@null$, .@key$, .@default$, .@extra$); 
return getarraysize(.@field$);

 

  • Love 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  159
  • Reputation:   58
  • Joined:  07/11/14
  • Last Seen:  

3 hours ago, Emistry said:

it return more than 1 field.

iuUM4Xm.png

 

you need to provide the array to store other fields that returned from the query.


query_sql("SHOW COLUMNS FROM `login` LIKE 'magic_shop%'", .@field$, .@type$, .@null$, .@key$, .@default$, .@extra$); 
return getarraysize(.@field$);

 

Thanks again Emistry, I did not know I needed to specify the other column outputs.

?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...