problem delete from table
#1

Hello, I have a problem in server_log. I have a timer that every 30 minutes check for logs to delete the old logs, but i get every time this errors:

The table `timeplayed' exist, i don't know why i get the error.
client2146 = my database name

Код:
[17:23:50] Error ID: 1146, Error: Table 'client2146.timeplayed' doesn't exist
[17:23:50] Callback: 
[17:23:50] gQuery: DELETE FROM `timeplayed` WHERE `unixtime` < '1505661830'
[17:23:50] ====================================================================
[17:23:50] ====================================================================
[17:23:50] Error ID: 1146, Error: Table 'client2146.antifraudaraport' doesn't exist
[17:23:50] Callback: 
[17:23:50] gQuery: DELETE FROM `antifraudaraport` WHERE `time` < '1510845830'
[17:23:50] ====================================================================
[17:23:50] ====================================================================
[17:23:50] Error ID: 1146, Error: Table 'client2146.blockedaccounts' doesn't exist
[17:23:50] Callback: 
[17:23:50] gQuery: UPDATE `blockedaccounts` SET `unblock`='0',`key`='',`linkexpire`='0' WHERE `unblock` < '1510586630'
[17:23:50] ====================================================================
[17:23:50] ====================================================================
[17:23:50] Error ID: 1146, Error: Table 'client2146.blockedaccounts' doesn't exist
[17:23:50] Callback: 
[17:23:50] gQuery: UPDATE `blockedaccounts` SET `linkexpire`='0',`key`='' WHERE `linkexpire` < '1510845830'
[17:23:50] ====================================================================
code:
Код:
new test[256];
	mysql_format(SQL, test, sizeof(test), "DELETE FROM `timeplayed` WHERE `unixtime` < '%d'", (gettime() - 86400*60));
	mysql_tquery(SQL, test, "", "");
	mysql_format(SQL, test, sizeof(test), "DELETE FROM `antifraudaraport` WHERE `time` < '%d'", gettime());
	mysql_tquery(SQL, test, "", "");
	mysql_format(SQL, test, sizeof(test), "UPDATE `blockedaccounts` SET `unblock`='0',`key`='',`linkexpire`='0' WHERE `unblock` < '%d'", (gettime() - 86400*3));
	mysql_tquery(SQL, test, "", "");
	mysql_format(SQL, test, sizeof(test), "UPDATE `blockedaccounts` SET `linkexpire`='0',`key`='' WHERE `linkexpire` < '%d'", gettime());
	mysql_tquery(SQL, test, "", "");
Reply
#2

As the error message say, these tables doesn't exist in your dataabase.
Reply
#3

Quote:
Originally Posted by Dayrion
Посмотреть сообщение
As the error message say, these tables doesn't exist in your dataabase.
The table is created

https://i.imgur.com/5RpPFjE.png
https://i.imgur.com/8zILN3t.png
Reply
#4

bump
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)