Skip to content

Instantly share code, notes, and snippets.

@mjvanhaastert
mjvanhaastert / example.lua
Last active February 21, 2024 19:18
different ways to use functions
QBCore.Functions = {}
QBCore.Functions.Vehicles = {}--make a new table for the vehicle functions
QBCore.Classes = {}
-- When designing a framework, especially for beginners, it's important to prioritize simplicity, readability, and ease of use.
-- However, you also need to consider scalability, maintainability, and security. Here's a brief analysis of the methods we discussed:
-- Basic Functions: They are simple and easy to understand, but they don't provide much structure or organization, especially for larger codebases.
-- Functions in Tables (Modules): They provide a way to group related functions together, which can make the code easier to understand and maintain.
select floor(datediff(now(),`geboortedatum`)/365.25)
from school.student where `studentnr` = '7777';
insert into opleiding (opleidingscode, naam, niveau)
values ('IE', 'Information Engineering', '4');
insert into studentopleiding (studentnr, opleidingscode, startdatum)
values ('7777', 'IE', '2017-01-15');
select datediff(now(), '2015-09-06');