Invalid connection handle problem
#1

error
Код:
[22:11:01] >> mysql_query( Connection handle: 0 )

[22:11:01] >> mysql_query() - Invalid connection handle. (You set: 0, Highest connection handle ID is 1).

[22:11:01] >> mysql_query( Connection handle: 0 )

[22:11:01] >> mysql_query() - Invalid connection handle. (You set: 0, Highest connection handle ID is 1).
my code

Код:
new q[128];
	format(q, 200, "INSERT INTO `businessdata` (`id`) VALUES (%d)", id);
	mysq_query(q);
Reply
#2

pawn Код:
new q[64];
format(q, sizeof(q), "INSERT INTO `businessdata` (id) VALUES (%d)", id);
mysq_query(q);
Try that.
Reply
#3

Same thing!
until this error everything is alright
Reply
#4

It's mysql_query not mysq_query. I guess you corrected that already though.

I'm not sure.
Reply
#5

please show your mysql_connect if you have it?
Reply
#6

there mysql_connection = mysql_connect(mysql_host, mysql_user, mysql_database, mysql_password);
Reply
#7

Is that located under ongamemodeinit?
Reply
#8

No, it's not. It's in end of script
Reply
#9

Needs to be in, or at least called from, OnGamemodeInit
Reply
#10

Same again. okey, are one strage thing
When I load house with same way everything is fain
When I load business is sh**

business loading
Код:
    new q[64];
    format(q, sizeof(q), "INSERT INTO `businessdata` (id) VALUES (%d)", id);
    mysql_query(q);
Houses loading
Код:
new q[128];
	format(q, 200, "INSERT INTO `housedata` (`id`) VALUES (%d)", id);
	QUERY(q);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)