Jump to content

NEED help about showing results or smt


tigerman

Recommended Posts

Posted
function testing(thePlayer, command) 
    local players = executeSQLQuery("SELECT milk FROM database") 
    outputConsole("test:", thePlayer) 
    for i, data in ipairs(players) do 
    bauh = data.milk 
        outputConsole("Blabla : " ..bauh, thePlayer) 
    end 
end 
  
addCommandHandler("te", testing) 

executeSQLCreateTable("database", "milk INT")

Ok, this should show all values that are in "milk" database, but it dont do anything, even no errors..

Posted

did you store anything?

just creating database and reading values will return nothing, as nothing is stored in DB

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Posted

are you sure? :3

get some SQLite database manager (http://code.google.com/p/sqlite-manager/ for example) and check if there is anything in your database.

because it looks like you've edited a wiki example from executeSQLQuery page. and no mentions here that anything was stored in your milk database.

PS: better not call your table "database". it can be confusing and no way to tell to which resource it belongs.

?

Posted

if you are sure it contains data then..

you are outputting it to console - are you checking the console or chatbox? it will be shown only in client console, not server.

script looks fine, so if there is a data - it will output to console. if there is no data - there will be no output

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Posted

i need to do the same:

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...