A Database Error Occurred

Error Number: 1064

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 '` LIMIT 12' at line 7

SELECT `units`.`title`, `price`, `currency`, `area`, `mohafzacode`, `ahyaacode`, `region_code`, `units`.`unit_id`, `purp`, `units`.`type`, `details`, `units`.`archive`, `sp_unit`.`stick`, `units`.`special`, `units`.`date`, `image1name`, `telephone`, `mobile`, `pu`.`wait`, `units`.`uid`, round(number_unit / 10) as usercount, `units`.`special` FROM (`units`) LEFT JOIN `users_units_num` as user_count ON `units`.`uid` = `user_count`.`uid` LEFT JOIN `paid_user_limited` as pu ON `units`.`uid` = `pu`.`uid` LEFT JOIN `sp_unit` ON `units`.`unit_id` = `sp_unit`.`unit_id` WHERE (units.title like '%تقسيط%' or units.details like '%تقسيط%' or email = 'تقسيط') and units.date >="2023-08-19" ORDER BY ( CASE WHEN image1name IS NULL or image1name = '' or image1name='0' THEN 1 ELSE 0 END ), ` LIMIT 12

Filename: /home/homzfous/public_html/6octcity.com/models/search_model.php

Line Number: 108