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 '.ads_pages pg left join ads_positions pos on pg.id = pos.pos_id' at line 1

select * from (select ads.* ,sh.width , sh.height, pg.position , pos.pos_id , pg.sort from .ads_pages pg left join ads_positions pos on pg.id = pos.pos_id inner join ads on ads.id = pos.img_id left join `ads_shapes` sh on ads.shape = sh.shape_id where status=1 and page='index' and position='left_side' order by position ,pg.sort, pos_id ,rand()) t group by pos_id order by position , sort

Filename: /home5/shoqtdvf/public_html/shofsouq.com/libraries/controller.php

Line Number: 363