MySQL connection.
#1

Sometimes when I send a query (no matter how does it look like), mysql_debug prints that handle is invalid:
Quote:

[17:22:36] >> mysql_query_callback() - Invalid connection handle. (You set: 0, Highest connection handle ID is 1).

or

Quote:

[17:22:36] >> mysql_query_callback() - Invalid connection handle. (You set: 0, Highest connection handle ID is 0).

Or sometimes it says that there is an error in the query, but OnQueryError doesnt print anything.
Reply
#2

Show me the query your trying to handle.
Reply
#3

As I said there's no difference. You can send for example

Quote:

UPDATE `existing_table_name` SET `field_name` = 'value' WHERE `something` = 'value'

Quote:

SELECT * FROM `existing_table_name` WHERE `field_name` = 'value'

And boom - here comes the message that connection handle is wrong.

___________________

And looks like it now says that connection handle is wrong on every query. Could it be this function? I just started using it some days ago, dunno if it is.

pawn Код:
function mysql_real_escape_stringex(str[])
{
    new escapedString[64];
    mysql_real_escape_string(str, escapedString);
    return escapedString;
}
Reply
#4

You're using 0 as the connection handle when you're supposed to be using 1- the error even says that!
Reply
#5

Noup. Look, an example:

Quote:

[17:50:30] >> mysql_query_callback( Connection handle: 0 )
[17:50:30] >> mysql_query_callback() - Invalid connection handle. (You set: 0, Highest connection handle ID is 0).
[17:50:30] >> mysql_connect(localhost, root, test, ******) on port 3306
[17:50:30] CMySQLHandler::CMySQLHandler() - constructor called.
[17:50:30] CMySQLHandler::CMySQLHandler() - Connecting to "localhost" | DB: "test" | Username: "root"
[17:50:30] CMySQLHandler::Connect() - Connection was successful.
[17:50:30] CMySQLHandler::Connect() - Auto-Reconnect has been enabled.
[17:50:30]
[17:50:30] ** MySQL Debugging enabled (06/22/13)
[17:50:30]
[17:50:30] >> mysql_ping( Connection handle: 1 )
[17:50:30] CMySQLHandler::Ping() - Connection is still alive.

And then, after sending a query somewhy it loggs off. The settings are right, XAMPP/WAMPP connection is online too.
Reply
#6

Bumping this shit xd
Reply
#7

https://sampforum.blast.hk/showthread.php?tid=64144

Reporting that shit.
Reply
#8

Damn, you must feel like a hero now! Go and scan other threads, I promise there is going to be many members which are bumping their threads minutes after the last post.

Stop being a drama queen, just report it and its all done, instead of cursing other members.
Reply
#9

You've been registered here for 2 years so you must of knowingly broke the forum rules. It's not my fault.
Reply
#10

Quote:
Originally Posted by BaubaS
Посмотреть сообщение
Noup. Look, an example:



And then, after sending a query somewhy it loggs off. The settings are right, XAMPP/WAMPP connection is online too.
that shows you runned a query before connecting to mysql
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)