How do you change it?
PHP Code:
static cell AMX_NATIVE_CALL SQL_MakeDbTuple(AMX *amx, cell *params)
{
SQL_Connection *sql = new SQL_Connection;
int len;
char *host = strdup(MF_GetAmxString(amx, params[1], 0, &len));
char *p = strchr(host, ':');
if (p)
{
sql->port = atoi(p+1);
*p = '\0';
} else {
sql->port = 0;
}
sql->host = host;
sql->user = strdup(MF_GetAmxString(amx, params[2], 0, &len));
sql->pass = strdup(MF_GetAmxString(amx, params[3], 0, &len));
sql->db = strdup(MF_GetAmxString(amx, params[4], 0, &len));
if (params[0] / sizeof(cell) >= 5)
{
sql->max_timeout = static_cast<unsigned int>(params[5]);
}
unsigned int num = MakeHandle(sql, Handle_Connection, FreeConnection);
return num;
}
This looks like it should work, but it changes the host to default internal IP of the server when the port is added.
Edit: Nevermind, this is from the newer SQLx version (it's most likely bugged in the old one).