Jump to content

Problem


Kenix

Recommended Posts

Posted

Hi guys.I have problem with sql

So code:

  
local sql = {  
    create = executeSQLCreateTable 
} 
  
addEventHandler("onResourceStart",resourceRoot, 
    function( ) 
        sql.create( 
            "achievements", 
            [[ 
            user STRING DEFAULT  '', 
            ach1 STRING DEFAULT '0', 
            ach2 STRING DEFAULT '0', 
            ach3 STRING DEFAULT '0', 
            ach4 STRING DEFAULT '0', 
            ach5 STRING DEFAULT '0', 
            ach6 STRING DEFAULT '0', 
            ach7 STRING DEFAULT '0', 
            ach8 STRING DEFAULT '0', 
            ach9 STRING DEFAULT '0', 
            ach10 STRING DEFAULT '0'  
            ]] 
        ) 
    end 
) 

debugscript 3 not write errors

DEFAULT not working and not set default value

Help please

Posted
  
executeSQLCreateTable("achievements", "user TEXT, ach1 TEXT, ach2 TEXT, ach3 TEXT, ach4 TEXT, ach5 TEXT, ach6 TEXT, ach7 TEXT, ach8 TEXT, ach9 TEXT, ach10 TEXT") 
  

What do you mean by default value? You can't have default values because you have no rows :)

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