Jump to content

[LUA]Mysql_Query() not counting rows


Recommended Posts

  • Premium

yes

 

The query is correct. Can you show us what you're doing with "kills" after the query executed? Also make sure your quest can use mysql queries via mysql_query() function :)

 

I'm trying after that to make and if statment comparing a number and the return of the query! example:

if kills >= 3 then
 syschat("hi")
end

Link to comment
Share on other sites

Hello!

 

I'm trying to count the number of entries that I've in this table, but my function isnt working!

local kills = mysql_query("SELECT COUNT(*) FROM database.table")

Can anybody fix this?

 

local kills = mysql_query("SELECT COUNT(*) FROM database.table")

local row = table.getn(kills)

say("Kill : "..row)

 

 

try this

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.