Задавайте вопросы, мы ответим
Вы не зашли.
Доброго времени суток!
Помогите пожалуйста!!! Сайт стабильно работал(друпал 7), а недавно начал выдавать ошибку:
PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064
В базах я пока что вообще не разбираюсь, уже неделю ищу решение у нас и на забугорных сайтах, но что то вообще никак без Вашей помощи.
Полный текст ошибки:
PDOException: 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 'AS , revision.uid AS revision_uid FROM node base INNER JOIN node_revision revis' at line 1: SELECT base.*, revision.*, revision.timestamp AS revision_timestamp, base. AS , revision.uid AS revision_uid FROM {node} base INNER JOIN {node_revision} revision ON revision.vid = base.vid WHERE (base.nid IN (:db_condition_placeholder_0, :db_condition_placeholder_1, :db_condition_placeholder_2, :db_condition_placeholder_3, :db_condition_placeholder_4, :db_condition_placeholder_5, :db_condition_placeholder_6, :db_condition_placeholder_7, :db_condition_placeholder_8, :db_condition_placeholder_9, :db_condition_placeholder_10, :db_condition_placeholder_11, :db_condition_placeholder_12, :db_condition_placeholder_13, :db_condition_placeholder_14, :db_condition_placeholder_15, :db_condition_placeholder_16, :db_condition_placeholder_17, :db_condition_placeholder_18, :db_condition_placeholder_19, :db_condition_placeholder_20, :db_condition_placeholder_21, :db_condition_placeholder_22, :db_condition_placeholder_23, :db_condition_placeholder_24, :db_condition_placeholder_25, :db_condition_placeholder_26, :db_condition_placeholder_27, :db_condition_placeholder_28, :db_condition_placeholder_29, :db_condition_placeholder_30, :db_condition_placeholder_31, :db_condition_placeholder_32, :db_condition_placeholder_33, :db_condition_placeholder_34, :db_condition_placeholder_35, :db_condition_placeholder_36, :db_condition_placeholder_37, :db_condition_placeholder_38, :db_condition_placeholder_39, :db_condition_placeholder_40, :db_condition_placeholder_41, :db_condition_placeholder_42, :db_condition_placeholder_43, :db_condition_placeholder_44, :db_condition_placeholder_45, :db_condition_placeholder_46, :db_condition_placeholder_47, :db_condition_placeholder_48, :db_condition_placeholder_49)) ; Array ( [:db_condition_placeholder_0] => 302 [:db_condition_placeholder_1] => 308 [:db_condition_placeholder_2] => 307 [:db_condition_placeholder_3] => 306 [:db_condition_placeholder_4] => 305 [:db_condition_placeholder_5] => 304 [:db_condition_placeholder_6] => 303 [:db_condition_placeholder_7] => 299 [:db_condition_placeholder_8] => 301 [:db_condition_placeholder_9] => 300 [:db_condition_placeholder_10] => 298 [:db_condition_placeholder_11] => 297 [:db_condition_placeholder_12] => 296 [:db_condition_placeholder_13] => 295 [:db_condition_placeholder_14] => 294 [:db_condition_placeholder_15] => 293 [:db_condition_placeholder_16] => 292 [:db_condition_placeholder_17] => 291 [:db_condition_placeholder_18] => 290 [:db_condition_placeholder_19] => 289 [:db_condition_placeholder_20] => 259 [:db_condition_placeholder_21] => 265 [:db_condition_placeholder_22] => 232 [:db_condition_placeholder_23] => 231 [:db_condition_placeholder_24] => 234 [:db_condition_placeholder_25] => 203 [:db_condition_placeholder_26] => 230 [:db_condition_placeholder_27] => 233 [:db_condition_placeholder_28] => 235 [:db_condition_placeholder_29] => 236 [:db_condition_placeholder_30] => 238 [:db_condition_placeholder_31] => 239 [:db_condition_placeholder_32] => 249 [:db_condition_placeholder_33] => 254 [:db_condition_placeholder_34] => 255 [:db_condition_placeholder_35] => 256 [:db_condition_placeholder_36] => 257 [:db_condition_placeholder_37] => 263 [:db_condition_placeholder_38] => 262 [:db_condition_placeholder_39] => 264 [:db_condition_placeholder_40] => 237 [:db_condition_placeholder_41] => 261 [:db_condition_placeholder_42] => 260 [:db_condition_placeholder_43] => 240 [:db_condition_placeholder_44] => 250 [:db_condition_placeholder_45] => 251 [:db_condition_placeholder_46] => 252 [:db_condition_placeholder_47] => 258 [:db_condition_placeholder_48] => 246 [:db_condition_placeholder_49] => 242 ) в функции DrupalDefaultEntityController->load() (строка 196 в файле /home/c/cl264704/public_html/includes/entity.inc).
Подскажите пожалуйста, хотя бы в каком направлении копать. Спасибо!
Неактивен
base. AS , нужно удалить
точнее смотреть место в коде где формируется запрос и определять почему он получается таким. скорее всего там теряется присвоение какой-то переменной.
Ставили новые модули или обновляли? Есди да, то проще откатиться.
Неактивен
Спасибо. Нет ни модулей, ни обновлений не ставил. Бэкап хостинг на три дня предоставляет, но он не помогает. Более ранний с компьютера скидывал, но дампа базы нет старого, не спасло(
Спасибо за оперативность) Только вот ни в файлах, ни в базе нет "base.as" и даже base
Неактивен
Судя по SELECT base.*,
должна быть таблица base
В самом php файле искать base нет смысла, так как там запрос собирается из переменных. Нужно найти место где выполняется запрос и идти вверх, определяя что там и как.
Возможно скорее подскажут на форуме про друпал.
Неактивен
base - алиас для базы данных, заданной переменной {node}, значение которой подставляется в скрипте. См.
Неактивен