This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

SQL COUNT
#4
(06.09.2019, 08:32)admin Wrote: Use getone() instead of getrow()

Hi

I am now having a similar challenge, but this time with the table I get from the string.split function. I have the following code;
Code:
startHG = string.split(start, '/')
This takes the Group address and splits it to the three values from the addres, giving med the table;

* table:
[1]
  * string: 26
[2]
  * string: 0
[3]
  * string: 0

How can I now get the different values entered in seperate variables? I would like to have a variable for maing group (e.g. mg) that should have the value 26 and so on.


(16.09.2019, 12:47)Trond Hoyem Wrote:
(06.09.2019, 08:32)admin Wrote: Use getone() instead of getrow()

Hi

I am now having a similar challenge, but this time with the table I get from the string.split function. I have the following code;
Code:
startHG = string.split(start, '/')
This takes the Group address and splits it to the three values from the addres, giving med the table;

* table:
[1]
  * string: 26
[2]
  * string: 0
[3]
  * string: 0

How can I now get the different values entered in seperate variables? I would like to have a variable for maing group (e.g. mg) that should have the value 26 and so on.

Nevermind. I found it out by trial and error. The code needs to be;
Code:
startHG = tonumber(string.split(start, '/')[1])

That will get the main group as a number.
There are 10 kinds of people in the world; those who can read binary and those who don't  Cool
Reply


Messages In This Thread
SQL COUNT - by Trond Hoyem - 06.09.2019, 08:29
RE: SQL COUNT - by admin - 06.09.2019, 08:32
RE: SQL COUNT - by Trond Hoyem - 06.09.2019, 08:39
RE: SQL COUNT - by Trond Hoyem - 16.09.2019, 12:47

Forum Jump: