Hi there,
It seems that <sqlx> is using the wrong host when connecting to the database, instead of using the IP provided, it uses the IP where the game server sit's on.
PHP Code:
#define HOST "92.222.129.164"
#define USER "layerfor_levelstages"
#define PASS "pass"
#define DB "layerfor_levelstages"
g_SqlTuple = SQL_MakeDbTuple(HOST, USER, PASS, DB)
new ErrorCode
SqlConnection = SQL_Connect(g_SqlTuple,ErrorCode,g_szError,charsmax(g_szError))
if(!SqlConnection)
{
log_amx("SQL: Could not connect to SQL database.")
}
new createinto[1002]
formatex(createinto, 1001, "CREATE TABLE IF NOT EXISTS `levelstages` (")
for (new i=0;i<sizeof(sqltables);i++)
{
formatex(createinto, 1001, "%s %s ",createinto,sqltables[i])
}
formatex(createinto, 1001, "%s)",createinto)
SQL_ThreadQuery(g_SqlTuple,"QueryHandle", createinto)
https://www.amxmodx.org/api/sqlx/SQL_MakeDbTuple
Watching it for couple hours straight today.. can't seem to understand what's going on