Notice (8): Undefined offset: 0 [APP/Controller/PostsController.php, line 270]
.: El Sol de Margarita :. El Sol de Margarita

Database Error

Error: SQLSTATE[42000]: Syntax error or access violation: 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 'ORDER BY id ASC' at line 4

SQL Query: SELECT * FROM poll_answers WHERE poll_id = ORDER BY id ASC

Notice: If you want to customize this error message, create app/View/Errors/pdo_error.ctp

Stack Trace

(default) 47 queries took 1009 ms
NrQueryErrorAffectedNum. rowsTook (ms)
1UPDATE `esdm`.`drafts` SET `status_id`=3 WHERE (`status_id`=2) AND (`publish_after` < '2014-04-24 09:57')004
2UPDATE `esdm`.`galleries` SET `show`=1 WHERE (`show`=0) AND (`active`=1) AND (`begin_date` < '2014-04-24 09:57')008
3UPDATE `esdm`.`ads` SET `show`=1 WHERE (`show`=0) AND (`active`=1) AND (`start` < '2014-04-24 09:57') AND (`end` > '2014-04-24 09:57')004
4UPDATE `esdm`.`ads` SET `show`=0 WHERE (`end` < '2014-04-24 09:57') OR (`start` > '2014-04-24 09:57')005
5SELECT `Frontpage`.`id`, `Frontpage`.`name`, `Frontpage`.`created`, `Frontpage`.`date`, `Frontpage`.`processed`, `Frontpage`.`user_id` FROM `esdm`.`frontpages` AS `Frontpage` WHERE ((`date` = '2014-04-24') AND (`processed` = '0')) ORDER BY `id` ASC LIMIT 1004
6SELECT `Draft`.`id`, `Draft`.`special`, `Draft`.`title`, `Draft`.`image_url`, `Draft`.`extract`, `Draft`.`category_id` FROM `esdm`.`drafts` AS `Draft` WHERE ((`Draft`.`status_id` = 3) AND (`Draft`.`column` = 1)) ORDER BY LEFT(`Draft`.`publish_after`, 10) DESC, `Draft`.`relevance_id` DESC, `Draft`.`publish_after` DESC LIMIT 101010171
7SELECT `Draft`.`id`, `Draft`.`special`, `Draft`.`title`, `Draft`.`image_url`, `Draft`.`extract`, `Draft`.`category_id` FROM `esdm`.`drafts` AS `Draft` WHERE `Draft`.`status_id` = 3 AND `Draft`.`column` = 2 ORDER BY LEFT(`Draft`.`publish_after`, 10) DESC, `Draft`.`relevance_id` DESC, `Draft`.`publish_after` DESC LIMIT 101010696
8SELECT `Draft`.`id`, `Draft`.`title`, `Draft`.`special`, `Draft`.`credit` FROM `esdm`.`drafts` AS `Draft` WHERE ((`Draft`.`status_id` = 3) AND (`Draft`.`category_id` = 7)) ORDER BY `Draft`.`publish_after` DESC LIMIT 5550
9SELECT `Category`.`id`, `Category`.`name` FROM `esdm`.`categories` AS `Category` WHERE `active` = '1' ORDER BY `Category`.`order` ASC28280
10SELECT `Category`.`id`, `Category`.`name`, `Category`.`menu_show` FROM `esdm`.`categories` AS `Category` WHERE ((`level` = 1) AND (`active` = '1')) ORDER BY `Category`.`order` ASC992
11SELECT `Category`.`id`, `Category`.`name`, `Category`.`menu_show` FROM `esdm`.`categories` AS `Category` WHERE ((`level` = 2) AND (`active` = '1') AND (`parent` = 4)) ORDER BY `Category`.`order` ASC003
12SELECT `Category`.`id`, `Category`.`name`, `Category`.`menu_show` FROM `esdm`.`categories` AS `Category` WHERE ((`level` = 2) AND (`active` = '1') AND (`parent` = 5)) ORDER BY `Category`.`order` ASC000
13SELECT `Category`.`id`, `Category`.`name`, `Category`.`menu_show` FROM `esdm`.`categories` AS `Category` WHERE ((`level` = 2) AND (`active` = '1') AND (`parent` = 3)) ORDER BY `Category`.`order` ASC000
14SELECT `Category`.`id`, `Category`.`name`, `Category`.`menu_show` FROM `esdm`.`categories` AS `Category` WHERE ((`level` = 2) AND (`active` = '1') AND (`parent` = 6)) ORDER BY `Category`.`order` ASC001
15SELECT `Category`.`id`, `Category`.`name`, `Category`.`menu_show` FROM `esdm`.`categories` AS `Category` WHERE ((`level` = 2) AND (`active` = '1') AND (`parent` = 1)) ORDER BY `Category`.`order` ASC000
16SELECT `Category`.`id`, `Category`.`name`, `Category`.`menu_show` FROM `esdm`.`categories` AS `Category` WHERE ((`level` = 2) AND (`active` = '1') AND (`parent` = 9)) ORDER BY `Category`.`order` ASC006
17SELECT `Category`.`id`, `Category`.`name`, `Category`.`menu_show` FROM `esdm`.`categories` AS `Category` WHERE ((`level` = 2) AND (`active` = '1') AND (`parent` = 8)) ORDER BY `Category`.`order` ASC006
18SELECT `Category`.`id`, `Category`.`name`, `Category`.`menu_show` FROM `esdm`.`categories` AS `Category` WHERE ((`level` = 2) AND (`active` = '1') AND (`parent` = 22)) ORDER BY `Category`.`order` ASC19194
19SELECT `Category`.`id`, `Category`.`name`, `Category`.`menu_show` FROM `esdm`.`categories` AS `Category` WHERE ((`level` = 2) AND (`active` = '1') AND (`parent` = 21)) ORDER BY `Category`.`order` ASC001
20SELECT `Draft`.`id`, `Draft`.`highlights`, `Draft`.`hits` FROM `esdm`.`drafts` AS `Draft` WHERE ((`publish_after` LIKE '2014-04-24%') AND (`status_id` = 3)) ORDER BY `Draft`.`hits` DESC LIMIT 44439
21SELECT DISTINCT `Ad`.`zone` FROM `esdm`.`ads` AS `Ad` WHERE `filter` LIKE '%#0#%'664
22SELECT `Ad`.`id`, `Ad`.`name`, `Ad`.`active`, `Ad`.`zone`, `Ad`.`filter`, `Ad`.`target`, `Ad`.`link`, `Ad`.`exclusive`, `Ad`.`url`, `Ad`.`path_to`, `Ad`.`mime_type`, `Ad`.`user_id`, `Ad`.`editor`, `Ad`.`status_id`, `Ad`.`start`, `Ad`.`end`, `Ad`.`created`, `Ad`.`modified`, `Ad`.`file`, `Ad`.`show` FROM `esdm`.`ads` AS `Ad` WHERE ((`filter` LIKE '%#0#%') AND (`zone` LIKE 'lat_sup_der') AND (`show` = '1'))444
23SELECT `Ad`.`id`, `Ad`.`name`, `Ad`.`active`, `Ad`.`zone`, `Ad`.`filter`, `Ad`.`target`, `Ad`.`link`, `Ad`.`exclusive`, `Ad`.`url`, `Ad`.`path_to`, `Ad`.`mime_type`, `Ad`.`user_id`, `Ad`.`editor`, `Ad`.`status_id`, `Ad`.`start`, `Ad`.`end`, `Ad`.`created`, `Ad`.`modified`, `Ad`.`file`, `Ad`.`show` FROM `esdm`.`ads` AS `Ad` WHERE ((`filter` LIKE '%#0#%') AND (`zone` LIKE 'portada_cabecera') AND (`show` = '1'))000
24SELECT `Ad`.`id`, `Ad`.`name`, `Ad`.`active`, `Ad`.`zone`, `Ad`.`filter`, `Ad`.`target`, `Ad`.`link`, `Ad`.`exclusive`, `Ad`.`url`, `Ad`.`path_to`, `Ad`.`mime_type`, `Ad`.`user_id`, `Ad`.`editor`, `Ad`.`status_id`, `Ad`.`start`, `Ad`.`end`, `Ad`.`created`, `Ad`.`modified`, `Ad`.`file`, `Ad`.`show` FROM `esdm`.`ads` AS `Ad` WHERE ((`filter` LIKE '%#0#%') AND (`zone` LIKE 'ban-sun-sol-exc') AND (`show` = '1'))330
25SELECT `Ad`.`id`, `Ad`.`name`, `Ad`.`active`, `Ad`.`zone`, `Ad`.`filter`, `Ad`.`target`, `Ad`.`link`, `Ad`.`exclusive`, `Ad`.`url`, `Ad`.`path_to`, `Ad`.`mime_type`, `Ad`.`user_id`, `Ad`.`editor`, `Ad`.`status_id`, `Ad`.`start`, `Ad`.`end`, `Ad`.`created`, `Ad`.`modified`, `Ad`.`file`, `Ad`.`show` FROM `esdm`.`ads` AS `Ad` WHERE ((`filter` LIKE '%#0#%') AND (`zone` LIKE 'full-banner-footer') AND (`show` = '1'))000
26SELECT `Ad`.`id`, `Ad`.`name`, `Ad`.`active`, `Ad`.`zone`, `Ad`.`filter`, `Ad`.`target`, `Ad`.`link`, `Ad`.`exclusive`, `Ad`.`url`, `Ad`.`path_to`, `Ad`.`mime_type`, `Ad`.`user_id`, `Ad`.`editor`, `Ad`.`status_id`, `Ad`.`start`, `Ad`.`end`, `Ad`.`created`, `Ad`.`modified`, `Ad`.`file`, `Ad`.`show` FROM `esdm`.`ads` AS `Ad` WHERE ((`filter` LIKE '%#0#%') AND (`zone` LIKE 'Ban_Home_Izq_2') AND (`show` = '1'))000
27SELECT `Ad`.`id`, `Ad`.`name`, `Ad`.`active`, `Ad`.`zone`, `Ad`.`filter`, `Ad`.`target`, `Ad`.`link`, `Ad`.`exclusive`, `Ad`.`url`, `Ad`.`path_to`, `Ad`.`mime_type`, `Ad`.`user_id`, `Ad`.`editor`, `Ad`.`status_id`, `Ad`.`start`, `Ad`.`end`, `Ad`.`created`, `Ad`.`modified`, `Ad`.`file`, `Ad`.`show` FROM `esdm`.`ads` AS `Ad` WHERE ((`filter` LIKE '%#0#%') AND (`zone` LIKE 'cab_izq') AND (`show` = '1'))110
28SELECT DISTINCT `Banner`.`zone` FROM `esdm`.`banners` AS `Banner` WHERE `filter` LIKE '%#0#%'775
29SELECT `Banner`.`id`, `Banner`.`name`, `Banner`.`active`, `Banner`.`zone`, `Banner`.`filter`, `Banner`.`target`, `Banner`.`link`, `Banner`.`exclusive`, `Banner`.`url`, `Banner`.`path_to`, `Banner`.`mime_type`, `Banner`.`user_id`, `Banner`.`editor`, `Banner`.`status_id`, `Banner`.`start`, `Banner`.`end`, `Banner`.`created`, `Banner`.`modified`, `Banner`.`file`, `Banner`.`show` FROM `esdm`.`banners` AS `Banner` WHERE ((`filter` LIKE '%#0#%') AND (`zone` LIKE 'lat_cua_der') AND (`active` = '1'))112
30SELECT `Banner`.`id`, `Banner`.`name`, `Banner`.`active`, `Banner`.`zone`, `Banner`.`filter`, `Banner`.`target`, `Banner`.`link`, `Banner`.`exclusive`, `Banner`.`url`, `Banner`.`path_to`, `Banner`.`mime_type`, `Banner`.`user_id`, `Banner`.`editor`, `Banner`.`status_id`, `Banner`.`start`, `Banner`.`end`, `Banner`.`created`, `Banner`.`modified`, `Banner`.`file`, `Banner`.`show` FROM `esdm`.`banners` AS `Banner` WHERE ((`filter` LIKE '%#0#%') AND (`zone` LIKE 'lat_qui_der') AND (`active` = '1'))002
31SELECT `Banner`.`id`, `Banner`.`name`, `Banner`.`active`, `Banner`.`zone`, `Banner`.`filter`, `Banner`.`target`, `Banner`.`link`, `Banner`.`exclusive`, `Banner`.`url`, `Banner`.`path_to`, `Banner`.`mime_type`, `Banner`.`user_id`, `Banner`.`editor`, `Banner`.`status_id`, `Banner`.`start`, `Banner`.`end`, `Banner`.`created`, `Banner`.`modified`, `Banner`.`file`, `Banner`.`show` FROM `esdm`.`banners` AS `Banner` WHERE ((`filter` LIKE '%#0#%') AND (`zone` LIKE 'lat_sex_der') AND (`active` = '1'))223
32SELECT `Banner`.`id`, `Banner`.`name`, `Banner`.`active`, `Banner`.`zone`, `Banner`.`filter`, `Banner`.`target`, `Banner`.`link`, `Banner`.`exclusive`, `Banner`.`url`, `Banner`.`path_to`, `Banner`.`mime_type`, `Banner`.`user_id`, `Banner`.`editor`, `Banner`.`status_id`, `Banner`.`start`, `Banner`.`end`, `Banner`.`created`, `Banner`.`modified`, `Banner`.`file`, `Banner`.`show` FROM `esdm`.`banners` AS `Banner` WHERE ((`filter` LIKE '%#0#%') AND (`zone` LIKE 'ban_supl_sup_izq') AND (`active` = '1'))114
33SELECT `Banner`.`id`, `Banner`.`name`, `Banner`.`active`, `Banner`.`zone`, `Banner`.`filter`, `Banner`.`target`, `Banner`.`link`, `Banner`.`exclusive`, `Banner`.`url`, `Banner`.`path_to`, `Banner`.`mime_type`, `Banner`.`user_id`, `Banner`.`editor`, `Banner`.`status_id`, `Banner`.`start`, `Banner`.`end`, `Banner`.`created`, `Banner`.`modified`, `Banner`.`file`, `Banner`.`show` FROM `esdm`.`banners` AS `Banner` WHERE ((`filter` LIKE '%#0#%') AND (`zone` LIKE 'Ban_Home_Izq_1') AND (`active` = '1'))774
34SELECT `Banner`.`id`, `Banner`.`name`, `Banner`.`active`, `Banner`.`zone`, `Banner`.`filter`, `Banner`.`target`, `Banner`.`link`, `Banner`.`exclusive`, `Banner`.`url`, `Banner`.`path_to`, `Banner`.`mime_type`, `Banner`.`user_id`, `Banner`.`editor`, `Banner`.`status_id`, `Banner`.`start`, `Banner`.`end`, `Banner`.`created`, `Banner`.`modified`, `Banner`.`file`, `Banner`.`show` FROM `esdm`.`banners` AS `Banner` WHERE ((`filter` LIKE '%#0#%') AND (`zone` LIKE 'cin-ser-car') AND (`active` = '1'))114
35SELECT `Banner`.`id`, `Banner`.`name`, `Banner`.`active`, `Banner`.`zone`, `Banner`.`filter`, `Banner`.`target`, `Banner`.`link`, `Banner`.`exclusive`, `Banner`.`url`, `Banner`.`path_to`, `Banner`.`mime_type`, `Banner`.`user_id`, `Banner`.`editor`, `Banner`.`status_id`, `Banner`.`start`, `Banner`.`end`, `Banner`.`created`, `Banner`.`modified`, `Banner`.`file`, `Banner`.`show` FROM `esdm`.`banners` AS `Banner` WHERE ((`filter` LIKE '%#0#%') AND (`zone` LIKE 'ban_supl_sup_der') AND (`active` = '1'))224
36SELECT `Gallery`.`id` FROM `esdm`.`galleries` AS `Gallery` WHERE `show` = '1' ORDER BY `Gallery`.`modified` DESC LIMIT 5551
37SELECT `Gallery`.`id`, `Gallery`.`name`, `Gallery`.`image_url`, `Gallery`.`image_title`, `Gallery`.`image_alt`, `Gallery`.`end_date`, `Gallery`.`begin_date`, `Gallery`.`active`, `Gallery`.`user_id`, `Gallery`.`editor`, `Gallery`.`created`, `Gallery`.`modified`, `Gallery`.`show` FROM `esdm`.`galleries` AS `Gallery` WHERE `Gallery`.`id` = 402 LIMIT 1110
38SELECT `GalleryPic`.`id`, `GalleryPic`.`gallery_id`, `GalleryPic`.`pic`, `GalleryPic`.`title`, `GalleryPic`.`alt`, `GalleryPic`.`displayed`, `GalleryPic`.`created`, `GalleryPic`.`modified` FROM `esdm`.`gallery_pics` AS `GalleryPic` WHERE `GalleryPic`.`gallery_id` = (402) ORDER BY `GalleryPic`.`created` DESC 14144
39SELECT `Gallery`.`id`, `Gallery`.`name`, `Gallery`.`image_url`, `Gallery`.`image_title`, `Gallery`.`image_alt`, `Gallery`.`end_date`, `Gallery`.`begin_date`, `Gallery`.`active`, `Gallery`.`user_id`, `Gallery`.`editor`, `Gallery`.`created`, `Gallery`.`modified`, `Gallery`.`show` FROM `esdm`.`galleries` AS `Gallery` WHERE `Gallery`.`id` = 401 LIMIT 1111
40SELECT `GalleryPic`.`id`, `GalleryPic`.`gallery_id`, `GalleryPic`.`pic`, `GalleryPic`.`title`, `GalleryPic`.`alt`, `GalleryPic`.`displayed`, `GalleryPic`.`created`, `GalleryPic`.`modified` FROM `esdm`.`gallery_pics` AS `GalleryPic` WHERE `GalleryPic`.`gallery_id` = (401) ORDER BY `GalleryPic`.`created` DESC 10102
41SELECT `Gallery`.`id`, `Gallery`.`name`, `Gallery`.`image_url`, `Gallery`.`image_title`, `Gallery`.`image_alt`, `Gallery`.`end_date`, `Gallery`.`begin_date`, `Gallery`.`active`, `Gallery`.`user_id`, `Gallery`.`editor`, `Gallery`.`created`, `Gallery`.`modified`, `Gallery`.`show` FROM `esdm`.`galleries` AS `Gallery` WHERE `Gallery`.`id` = 400 LIMIT 1110
42SELECT `GalleryPic`.`id`, `GalleryPic`.`gallery_id`, `GalleryPic`.`pic`, `GalleryPic`.`title`, `GalleryPic`.`alt`, `GalleryPic`.`displayed`, `GalleryPic`.`created`, `GalleryPic`.`modified` FROM `esdm`.`gallery_pics` AS `GalleryPic` WHERE `GalleryPic`.`gallery_id` = (400) ORDER BY `GalleryPic`.`created` DESC 12121
43SELECT `Gallery`.`id`, `Gallery`.`name`, `Gallery`.`image_url`, `Gallery`.`image_title`, `Gallery`.`image_alt`, `Gallery`.`end_date`, `Gallery`.`begin_date`, `Gallery`.`active`, `Gallery`.`user_id`, `Gallery`.`editor`, `Gallery`.`created`, `Gallery`.`modified`, `Gallery`.`show` FROM `esdm`.`galleries` AS `Gallery` WHERE `Gallery`.`id` = 394 LIMIT 1113
44SELECT `GalleryPic`.`id`, `GalleryPic`.`gallery_id`, `GalleryPic`.`pic`, `GalleryPic`.`title`, `GalleryPic`.`alt`, `GalleryPic`.`displayed`, `GalleryPic`.`created`, `GalleryPic`.`modified` FROM `esdm`.`gallery_pics` AS `GalleryPic` WHERE `GalleryPic`.`gallery_id` = (394) ORDER BY `GalleryPic`.`created` DESC 13133
45SELECT `Gallery`.`id`, `Gallery`.`name`, `Gallery`.`image_url`, `Gallery`.`image_title`, `Gallery`.`image_alt`, `Gallery`.`end_date`, `Gallery`.`begin_date`, `Gallery`.`active`, `Gallery`.`user_id`, `Gallery`.`editor`, `Gallery`.`created`, `Gallery`.`modified`, `Gallery`.`show` FROM `esdm`.`galleries` AS `Gallery` WHERE `Gallery`.`id` = 396 LIMIT 1113
46SELECT `GalleryPic`.`id`, `GalleryPic`.`gallery_id`, `GalleryPic`.`pic`, `GalleryPic`.`title`, `GalleryPic`.`alt`, `GalleryPic`.`displayed`, `GalleryPic`.`created`, `GalleryPic`.`modified` FROM `esdm`.`gallery_pics` AS `GalleryPic` WHERE `GalleryPic`.`gallery_id` = (396) ORDER BY `GalleryPic`.`created` DESC 771
47 SELECT * FROM polls WHERE active = 1 AND ( NOW() BETWEEN begin_date AND end_date ) ORDER BY begin_date DESC LIMIT 1 000