Error Can't execute SQL

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
boang311
Posts: 4
Joined: Wed Jul 10, 2019 11:11 am

Error Can't execute SQL

Post by boang311 »

Error:

Can't execute SQL: SELECT * FROM `hesk_tickets` WHERE `status` = '2' AND `lastchange` <= '2021-09-01 15:23:53'

MySQL said:
Incorrect file format 'hesk_tickets'

Is anyone experiencing this phenomena of mine? Please share your thoughts
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Re: Error Can't execute SQL

Post by Klemen »

Sounds like a corrupt (damaged) mySQL table.

Go to MySQL (for example, phpMyAdmin) and run a

Code: Select all

REPAIR TABLE `hesk_tickets`;
SQL query (or, in phpMyAdmin, select table then Operations > Repair table)
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
boang311
Posts: 4
Joined: Wed Jul 10, 2019 11:11 am

Re: Error Can't execute SQL

Post by boang311 »

Sir Klemen, Thank you for the reply. I guess this won't be repairable right?

Code: Select all

Executing SQL command REPAIR TABLE `hesk_tickets`; ..
Table				Op		Msg_type	Msg_text
trackingsys.hesk_tickets	repair		Error		Incorrect file format 'hesk_tickets'
trackingsys.hesk_tickets	repair		error		Corrupt
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Re: Error Can't execute SQL

Post by Klemen »

Looks like a nasty error in your SQL database. I am not an expert in fixing MySQL corrupted files, but would look at the options in the MySQL documentation:
https://dev.mysql.com/doc/refman/8.0/en ... table.html

If everything fails, the obvious solution would be to restore from a backup.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Re: Error Can't execute SQL

Post by Klemen »

Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Post Reply