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
#1
Hi

I am having some trouble getting a number from the SQL COUNT.

I am using this conde:
Code:
ant = db:getrow('SELECT COUNT() FROM objects WHERE name LIKE "%status%"')

log(ant)

The result I get from this in the log is then;
* table:
[COUNT()]
  * number: 569


What I need is to just get the number stored in the variable, not the entire table. Any good tips for me?
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: