Query: SELECT COUNT(*) as c FROM `letters` LEFT JOIN people ON (`letters`.`receiver_id`=`people`.`_id` and `people`.`_lang`='1') WHERE `letters`.`is_published`='1' and `letter_themes`.`theme_id`='1 and `letters`.`_lang`='1' ORDER BY `people`.`name` DESC
Error: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 '1' ORDER BY `people`.`name` DESC' at line 1
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 '1' ORDER BY `people`.`name` DESC' at line 1
Query: SELECT DISTINCT `letters`.`id` as `id`, `letters`.`_id` as `_id`, `letters`.`receiver_id` as `receiver_id`, `letters`.`reference_num` as `reference_num`, `letters`.`publication_date_from` as `publication_date_from`, `letters`.`publication_date_to` as `publication_date_to`, `letters`.`place_to` as `place_to`, `letters`.`place` as `place` FROM `letters` LEFT JOIN people ON (`letters`.`receiver_id`=`people`.`_id` and `people`.`_lang`='1') WHERE `letters`.`is_published`='1' and `letter_themes`.`theme_id`='1 and `letters`.`_lang`='1' ORDER BY `people`.`name` DESC LIMIT 0, 20
Error: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 '1' ORDER BY `people`.`name` DESC LIMIT 0, 20' at line 1