Well, yesterday i begun to use mysql on my server and i dont understand very well about it, so this is my problem
PHP Code:
// Connect to SQL
new Handle:SqlConnect = SQL_Connect(g_hTuple, ErrorCode, g_Error, 511)
// Create Handle
new Handle:Query
Query = SQL_PrepareQuery(SqlConnect, "SELECT * FROM `cuentas` WHERE (`Nombre` = '%s')", cuenta[id]) --> line 393
// Query Execute ?
if (SQL_Execute(Query))
{
if (!SQL_NumResults(Query))
{
crear_contrasenia(id)
// Connection Closed
SQL_FreeHandle(Query)
SQL_FreeHandle(SqlConnect)
return PLUGIN_HANDLED;
}
else
{
mensajes_cuenta(id, 1)
client_print(id, print_center, "Esa cuenta ya existe!")
show_menu_cuenta(id)
return PLUGIN_HANDLED;
}
}
and in the console of the server
PHP Code:
L 11/09/2011 - 18:32:48: [MySQL] Invalid database handle: 0
L 11/09/2011 - 18:32:48: [AMXX] Displaying debug trace (plugin "guardado_sql.amxx")
L 11/09/2011 - 18:32:48: [AMXX] Run time error 10: native error (native "SQL_PrepareQuery")
L 11/09/2011 - 18:32:48: [AMXX] [0] guardado_sql.sma::filtro_crear_cuenta (line 393)