Error

Message: 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 'AND flag = '1' ORDER BY sort' at line 7
Code: 0
File: /var/www/clients/client1/web1/web/system/model/core/class.mysql.php
Line: 76
Trace:
0 =>
file => /var/www/clients/client1/web1/web/system/controller/kellekanyagok.festekszalag.tipus.php
line => 99
function => __construct
class => MyDB
type => ->
args => Array

1 =>
file => /var/www/clients/client1/web1/web/system/controller/kellekanyagok.festekszalag.tipus.php
line => 298
function => view
class => Festekszalag_tipus_controller
type => ->
args => Array

2 =>
file => /var/www/clients/client1/web1/web/system/config/router.php
line => 1170
args => Array
function => include

3 =>
file => /var/www/clients/client1/web1/web/index.php
line => 15
args => Array
function => include_once