Hey, I'm back again with a new video that hopefully helps folks get their database connection initialized. Enjoy.
Announcement
Collapse
No announcement yet.
Database Setup
Collapse
X
-
Originally posted by ZepTepProd View PostHey buddy, you don't show in your video where and how to get the mariadb dll! Can you send me it or show me how to create it please i'm lost
Comment
-
Hello I have error : bad argument #2 to 'mariadb_async_query' (expected string-like argument)
[LUA]function cmd_heure(player)
local query = mariadb_prepare(SQL, "SELECT CURRENT_TIMESTAMP()")
mariadb_async_query(SQL, query , cb_gettimestamp, player)
end
AddCommand("heure", cmd_heure)
function cb_gettimestamp()
local timestamp = mariadb_get_value_index(1, 1)
AddPlayerChat(player, "Il est : " .. timestamp)
end[/LUA]
Comment
-
Originally posted by KeyTur View PostHello I have error : bad argument #2 to 'mariadb_async_query' (expected string-like argument)
[LUA]function cmd_heure(player)
local query = mariadb_prepare(SQL, "SELECT CURRENT_TIMESTAMP()")
mariadb_async_query(SQL, query , cb_gettimestamp, player)
end
AddCommand("heure", cmd_heure)
function cb_gettimestamp()
local timestamp = mariadb_get_value_index(1, 1)
AddPlayerChat(player, "Il est : " .. timestamp)
end[/LUA]
Comment
-
Originally posted by Talos View Post
Looks like mariadb_prepare returned a false boolean. Check the mariadb_log, maybe your connection isn't setup properly.
Yes Thanks
Comment
Comment