MySQL Help
#1

Код:
stock SaveBizz()
{
	new req[1024];
 	format(req, sizeof(req), "UPDATE `bussines` SET `Owned` = '%i', `Owner` = '%s', `Bank` = '%i', `Prod` = '%i', `Upgrade` = '%i', `WorkerPay` = '%i', `ManagerPay` = '%i' WHERE `ID` = %i",
  	BizzInfo[0][bOwned], BizzInfo[0][bOwner], BizzInfo[0][bBank], BizzInfo[0][bProd], BizzInfo[0][bUpgrade], BizzInfo[0][bWP], BizzInfo[0][bMP], BizzInfo[0][bID]);
	mysql_query(req, -1, 0, MySQL);
	return 1;
}
So, as I planned, when u call this function it saves info about Bizz[0][...] to DB. But it doesn't. What am I doing wrong?
MySQL v5.5
Reply
#2

Show us mysql log
Reply
#3

MySQL log:
Код:
[00:02:04] >> mysql_connect(localhost, root, server, ******) on port 3306
[00:02:04] CMySQLHandler::CMySQLHandler() - constructor called.
[00:02:04] CMySQLHandler::CMySQLHandler() - Connecting to "localhost" | DB: "server" | Username: "root"
[00:02:04] CMySQLHandler::Connect() - Connection was successful.
[00:02:04] CMySQLHandler::Connect() - Auto-Reconnect has been enabled.
[00:02:04] >> mysql_ping( Connection handle: 1 )
[00:02:04] CMySQLHandler::Ping() - Connection is still alive.
[00:02:04] >> mysql_query_callback( Connection handle: 1 )
[00:02:04] Passing query SELECT * FROM `bussines` | 
[00:02:04] ProcessQueryThread(LoadBizz) - Query was successful. (SELECT * FROM `bussines`)
[00:02:04] ProcessQueryThread(LoadBizz) - Data caching enabled.
[00:02:04] CMySQLHandler::StoreResult() - Result was stored.
[00:02:04] CMySQLHandler::FreeResult() - Result was successfully free'd.
[00:02:04] CMySQLHandler::ProcessQueryThread() - Data is getting passed to ->ProcessTick()
[00:02:04] LoadBizz() - Threaded function called.
[00:02:04] >> cache_get_data( Connection handle: 1 )
[00:02:04] ProcessTick() - The cache has been cleared.
[00:02:42] >> mysql_query_callback( Connection handle: 1 )
[00:02:42] Passing query UPDATE `bussines` SET `Owned` = '1', `Owner` = 'Augustin_Ocasio', `Bank` = '1', `Prod` = '1', `Upgrade` = '2', `WorkerPay` = '6', `ManagerPay` = '10' WHERE `ID` = 1 | siii
[00:02:42] CMySQLHandler::ProcessQueryThread() - Error will be triggered to OnQueryError()
[00:02:42] OnQueryError() - Called.
[00:02:49] >> mysql_close( Connection handle: 1 )
[00:02:49] CMySQLHandler::~CMySQLHandler() - deconstructor called.
[00:02:49] CMySQLHandler::FreeResult() - The result is already empty.
[00:02:49] CMySQLHandler::Disconnect() - Connection was closed.
[00:02:49] Unloading Plugin
Reply
#4

Up!!
Reply
#5

Try this:
PHP код:
mysql_query(req, -10MySQL); 
to
PHP код:
mysql_query(req,MySQL); 
Reply
#6

Tried, I couldnt even compile it like that.
Reply
#7

Up once more, cause I can't solve the problem myself.
Reply
#8

What would happened if you change this:

PHP код:
mysql_query(req, -10MySQL); 
to this:
PHP код:
mysql_query(req, .connectionHandle=MySQL); 
Does the error still occurred?
Reply
#9

I'll try.
Reply
#10

Up..
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)