syntax to use near 'main#SET NAMES 'utf8''

Cs-cart version 4

I have this error how can i solve it ?

[color=#333333][font=Arial, Helvetica, sans-serif][size=3]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'main#SET NAMES 'utf8'' at line 1 [/size][/font][/color]b[/b]

[color=#333333][font=Arial, Helvetica, sans-serif][size=3]main#SET NAMES 'utf8'[/size][/font][/color]


File: app/Tygh/Database.php Line: 301 Function: _error File: app/functions/fn.database.php Line: 130 Function: query File: app/payments/pagoprueba.php Line: 49 Function: db_query File: app/functions/fn.cart.php Line: 1044 Function: include File: app/controllers/frontend/checkout.php Line: 409 Function: fn_start_payment File: app/functions/fn.control.php Line: 581 Function: include File: app/functions/fn.control.php Line: 374 Function: fn_run_controller File: index.php Line: 24 Function: fn_dispatch