Jump to content

[HELP] SQL functions


PauloCascus

Recommended Posts

i have a problem with sqlite database

just i want to create special database for ACL groups

and i saw function like this ( but my shit isn't work xD )

executeSQLQuery do not created table into the db and i think this table has been created in internal.db becouze i saw some the same tables there

sorry for bad english :)

function groupdb() 
groupdb = dbConnect("sqlite", "group.db") 
if (groupdb) then 
executeSQLQuery("CREATE TABLE IF NOT EXIST group ( name TEXT, permission TEXT, accounts TEXT )") 
outputDebugString("You have seccessfully connected to the group.db") 
else 
outputDebugString("You have not connected to the group.db") 
end 
end 
addEventHandler("onResourceStart", getRootElement(), groupdb) 

Link to comment

lol if you want learn database functions look at this Database

function groupdb() 
    groupdb = dbConnect("sqlite", "group.db") 
    if (groupdb) then 
        dbExec(groupdb , "CREATE TABLE IF NOT EXIST group ( name TEXT, permission TEXT, accounts TEXT )") 
        outputDebugString("You have seccessfully connected to the group.db") 
    else 
        outputDebugString("You have not connected to the group.db") 
    end 
end 
addEventHandler("onResourceStart", getRootElement(), groupdb) 

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