28.04.2013, 20:56
Hello there, i got the following situation, sometimes mysql don't run properly my function and i have the following
code:
Then i gonna see my logs and sometimes i get this:
Other times, i get this:
What could be happening here?
code:
Code:
connectData = mysql_connect(myHost, myUser, myData, myPass); if(mysql_ping(connectData) == 1) { mysql_debug(1); printf("[MYSQL] Coneccao com a base de dados: SUCESSO!"); mysql_function_query(connectData, "SELECT nome FROM contas WHERE nome = 'Mishima_Kazuma'", false, "", ""); mysql_store_result(connectData); new linhas = mysql_num_rows(connectData); mysql_free_result(connectData); } else { printf("[MYSQL] Coneccao com a base de dados: ERRO!"); }
Code:
[22:16:05] [WARNING] 'mysql_debug' is deprecated, use 'mysql_log' instead. [22:16:05] [DEBUG] >> mysql_query_callback(Connection handle: 1) [22:16:05] [DEBUG] ProcessQueryThread() - Executing query SELECT nome FROM contas WHERE nome = 'Mishima_Kazuma'... [22:16:06] [DEBUG] ProcessQueryThread() - Query was successful. [22:16:06] [DEBUG] ProcessQueryThread() - Data being passed to ProcessTick(). [22:16:06] [DEBUG] >> mysql_store_result(Connection handle: 1) [22:16:06] [DEBUG] CMySQLHandler::StoreResult() - Result was stored. [22:16:06] [DEBUG] >> mysql_num_rows(Connection handle: 1) [22:16:06] [DEBUG] CMySQLHandler::NumRows() - Returned 2 row(s). [22:16:06] [DEBUG] >> mysql_free_result(Connection handle: 1) [22:16:06] [DEBUG] CMySQLHandler::FreeResult() - Result was successfully freed.
Code:
[22:16:42] [WARNING] 'mysql_debug' is deprecated, use 'mysql_log' instead. [22:16:42] [DEBUG] >> mysql_query_callback(Connection handle: 1) [22:16:42] [DEBUG] >> mysql_store_result(Connection handle: 1) [22:16:42] [WARNING] CMySQLHandler::StoreResult() - No data to store. [22:16:42] [DEBUG] ProcessQueryThread() - Executing query SELECT nome FROM contas WHERE nome = 'Mishima_Kazuma'... [22:16:42] [DEBUG] ProcessQueryThread() - Query was successful. [22:16:42] [DEBUG] ProcessQueryThread() - Data being passed to ProcessTick(). [22:16:42] [DEBUG] >> mysql_num_rows(Connection handle: 1) [22:16:42] [ERROR] CMySQLHandler::NumRows() - You cannot call this function now (no result). [22:16:42] [DEBUG] >> mysql_free_result(Connection handle: 1) [22:16:42] [WARNING] CMySQLHandler::FreeResult() - The result is already empty.