BloxSQL Reloaded, mySQL Databases for your Roblox Game!

I’ve done everything right (as far as i can see) when it come to selecting etc but it keeps returning Nil,

local success, reponse = BLOXsql:execute("SELECT whitelisted FROM whitelist WHERE playerID IS NOT NULL", Settings)
if success then
	print(reponse)
else
	print("F")
	print(reponse)
end

This returns Nil, no matter what I try and look for. Even tried hardcoding my own playerID in, wich i know 100% certain is in the database but it still returns Nil.

Any clue as to what might be causing this?

Yes, here it is: https://bloxsql.metatable.dev

This is old documentation from 2020 and kinda bad and may be incorrect for reloaded. Ill look into bloxsql reloaded code for any issues.

Created a test, seems to work fine.

  14:38:34.610   {
                    [1] =  {
                       ["username"] = "Roblox"
                    }
                 }  -  Server - Script:13
local BLOXsql = require(script.ModuleScript)

local Settings= {
	Username = "rampagec_metatabledev",
	Password = "FAAUbYZDuvB3cE6WwEf7",
	Host = "rampagecloud.com",
	Database = "rampagec_metatabledev"
}

BLOXsql:execute("INSERT INTO users (username) VALUES('Roblox')", Settings)

local result = BLOXsql:execute("SELECT * FROM users", Settings)
print(result)

Code:

--[[
Copyright 2024 RAMPAGE Interactive
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 
of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
This Software was developed by vq9o.
]]

local BloxSQL = {}
local HttpService = game:GetService("HttpService")

local function Post(packet)
	print(packet)
	local posted = HttpService:PostAsync("http://141.98.74.17:25570/v1", packet, Enum.HttpContentType.ApplicationJson, false)
	local returnData
	local success, err = pcall(function()
		returnData = HttpService:JSONDecode(posted)
	end)

	if success then
		return returnData
	else
		return(err)
	end
end

function BloxSQL:execute(QuerySQL, settings)
	local Host = settings.Host
	local Username = settings.Username
	local Password = settings.Password
	local Database = settings.Database

	if Host == nil or Username == nil or Password == nil or Database == nil then
		return error("Invalid settings for BLOXsql")
	end

	return Post(HttpService:JSONEncode({
		Host = Host,
		Username = Username,
		Password = Password,
		Database = Database,
		Query = QuerySQL
	}))
end

return BloxSQL

Important

Make sure you allow “141.98.74.14” to connect.

For some reason this just returns

table: 0xf97fddc7794ada1e

Code I’m using to print:

local result = BLOXsql:execute("SELECT robloxID FROM whitelist", Settings)
print(result)

You cannot print tables in a readable state in-game or in studio without a custom loop/function. 0xf97fddc7794ada1e is your table memory address.

However there is a method to view it in studio by setting LogMode off.

Before
image

After
image