-
Notifications
You must be signed in to change notification settings - Fork 46
Database
Adrian Preuß edited this page Jan 18, 2021
·
2 revisions
If you contribute to fun-bots
please don't use the SQL
Library from Venice Unleashed
. We has provided an own class named Database
.
Database:createTable('TestName', {
DatabaseField.ID,
DatabaseField.Text,
DatabaseField.Integer,
DatabaseField.Time
}, {
'ID',
'Key',
'Value',
'Time'
});
local lastID = Database:insert('TestName', {
ID = DatabaseField.NULL,
Key = 'Hello',
Value = 'World',
Time = Database:now()
});
Database:delete('TestName', {
ID = 0
});
local single = Database:single('SELECT * FROM `TestName` WHERE `Key`=\'Hello\'');
print(single);
local all = Database:fetch('SELECT * FROM `TestName` WHERE `Key`=\'Hello\'');
print(all);
local count = Database:count('SELECT * FROM `TestName` WHERE `Key`=\'Hello\'');
print(count);
Download latest release⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ToDo⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀Bugs & Issues