tiddpd
PHP Scripter
- Joined
- Apr 16, 2008
- Messages
- 331
- Reaction score
- 0
I have the sql query right, however I'm trying to print it out in game. I've tried the query in phpmyadmin and it worked fine. So I am trying to get the result in game.
What I have it doing is counting the amount of answers in my vote. Anyways heres what I'm attempting which of course is not working.
This is not the whole code, just the section where I'm having problems. For example there are 3 votes for pvp, and I want it to say 3. How can I do this?
Error:
What I have it doing is counting the amount of answers in my vote. Anyways heres what I'm attempting which of course is not working.
Code:
local result = db.getResult("SELECT COUNT(pvp) FROM vote_ans WHERE pvp=1")
local textout = result:getDataInt("pvp")
doPlayerSendTextMessage(cid, 19, "test " .. textout .. ".")
This is not the whole code, just the section where I'm having problems. For example there are 3 votes for pvp, and I want it to say 3. How can I do this?
Error:
Code:
[07/04/2009 21:18:52] Error during getDataInt(pvp).