[Include] Easy SQLite: Simplyfing the usage of SQLite queries!
#6

Added in v2.0 - Transactions:

PHP Code:
SL::Begin(DB:database DB:1)
SL::Commit(DB:database DB:1
Example code:

PHP Code:
new DB:MyDB;
main()
{
    
MyDB SL::Connect("test.db");
    new 
handle SL::Open(SL::CREATE"example""", -1MyDB);
    
SL::AddTableEntry(handle"fooA"SL_TYPE_INT11true); 
    
SL::AddTableEntry(handle"fooB"SL_TYPE_VCHAR24); 
    
SL::AddTableEntry(handle"fooC"SL_TYPE_FLOAT); 
    
SL::Close(handle);
    
    
SL::Begin(MyDB);
    for(new 
i!= 10000i++)
    {
        
handle SL::Open(SL::INSERT"example""", -1MyDB); 
        
SL::WriteString(handle"fooB""SomeB");  
        
SL::WriteFloat(handle"fooC"0.0); 
        
SL::Close(handle);
    }
    
SL::Commit(MyDB);

Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)