Jump to content

NEED help about showing results or smt


tigerman

Recommended Posts

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..

Link to comment

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.

Link to comment

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...