Insert Data
Insert
We will be showing you how to do a basic INSERT with BLOXsql.
After a database and a table have been created, you are able to start creating some data into them with BLOXsql.
Here are some syntax rules to follow:
The SQL query must be quoted in PHP
String values inside the SQL query must be quoted
Numeric values must not be quoted
The word NULL must not be quoted
w3schools.com
The INSERT INTO is used to add new records to a MySQL table. Here's an example using BLOXsql.
local BLOXsql = require(16229654720)
local Settings= {
-- Ensure you whitelist "141.98.74.17" with your database host.
Username = "rampage_admin",
Password = "1234567890",
Host = "localhost",
Database = "rampage_main"
}
BLOXsql:execute("INSERT INTO example (name) VALUES('Roblox')", Settings)
Inserting data into a table.
INSERT INTO table_name (column1, column2,...)
VALUES (value1, value2, ...)
Last updated
Was this helpful?