Fatal error: Uncaught exception 'Exception' with message 'Mysql error:: 1054 (Unknown column 'max_ctr' in 'order clause'

Post Reply
S_Flash
Posts: 1788
Joined: Mon Mar 08, 2010 9:04 am
Contact:

Fatal error: Uncaught exception 'Exception' with message 'Mysql error:: 1054 (Unknown column 'max_ctr' in 'order clause'

Post by S_Flash »

Обновил навсякий старый скрипт
(c) SmartCJ Pro V 1.51 Build 201603221213 (Lastest build: 201603221213

Поставил рядом в новуб базу
(c) SmartCJ Pro V 2.1 Your Build 201902071045 (Current build: 201603221213 )

Запустил php scj_1to2_db_converter.php в bin.
Скрипт отработал без ошибок.
В List thumbs v2 вижу такое сообщение:
Fatal error: Uncaught exception 'Exception' with message 'Mysql error:: 1054 (Unknown column 'max_ctr' in 'order clause') (db_link) in query SELECT SQL_CALC_FOUND_ROWS gs.gallery_id, gs.thumb_id, gi.sponsor_id, gi.content_count, gi.content_type, gs.total_shows, gs.total_clicks, gs.total_ctr, gt.thumb_url, gd.*, gi.content_count, gi.crop_profile_id, gi.activation_date, gi.added_date, gi.duration, gi.url, gi.gallery_total_shows, gi.sponsor_id, gi.source_url, gi.custom_gallery FROM rot_gallery_stats1 as gs JOIN rot_gallery_info as gi on gi.gallery_id = gs.gallery_id JOIN rot_gallery_data1 as gd on gd.gallery_id = gs.gallery_id JOIN rot_thumbs as gt on gt.thumb_id = gs.thumb_id WHERE 1 = 1 AND gi.gallery_status IN ('16') AND gi.gallery_type = 0 and gs.best_thumb = 'yes' and gs.group_id = 0 group by gs.gallery_id, gs.thumb_id ORDER BY max_ctr desc LIMIT 0, 15# queryitems. (aporns.com) ' in /home/aporns/aporns.com/scj2/includes/db_modules/mysql.php:129 Stack trace: #0 /home/aporns/aporns.com/scj2/includes/db_mod in /home/aporns/aporns.com/scj2/includes/db_modules/mysql.php on line 129
  • FreeBSD 9.1-RELEASE-p4
  • PHP Version 5.4.45
  • MySQL Client API version 5.5.35
richmantrade
Posts: 1036
Joined: Tue Dec 04, 2012 8:46 am

Re: Fatal error: Uncaught exception 'Exception' with message 'Mysql error:: 1054 (Unknown column 'max_ctr' in 'order cla

Post by richmantrade »

Тоже сталкивался с подобной ошибкой.
Искать причину не стал, а просто добавил в урл все сортировки с рабочего сайта... А потом оно в любом случае норм работает.

Прогрузи ListThumbs вот так:

Code: Select all

/scj/admin/?operation=rotation&sub=rot_list&vars[status][]=active&vars[show_linked_site_id]=1&vars[export_limit]=1000&vars[export_delimiter]=|&vars[pattern][]=url&vars[pattern][]=desc&vars[pattern][]=thumb&vars[pattern][]=skip&vars[pattern][]=skip&vars[pattern][]=skip&vars[pattern][]=skip&vars[pattern][]=skip&vars[pattern][]=skip&vars[export_fields_num]=9&vars[sort]=total_ctr desc&vars[layout]=full&vars[results_per_page]=18&vars[rows_per_page]=5&vars[cols_per_page]=3&vars[show_thumbs]=0&vars[site_id]=1&vars[description_id]=1&page=0
а после этого можешь прогружать как угодно.
S_Flash
Posts: 1788
Joined: Mon Mar 08, 2010 9:04 am
Contact:

Re: Fatal error: Uncaught exception 'Exception' with message 'Mysql error:: 1054 (Unknown column 'max_ctr' in 'order cla

Post by S_Flash »

Там это не всё..
При запросе /scj2/tube/
Fatal error: Uncaught exception 'Exception' with message 'Mysql error:: 1146 (Table 'tc_apornscom.rot_gallery_stats' doesn't exist) (db_link) in query SELECT gs.thumb_id, gi.sponsor_id, gi.url, gi.crop_profile_id, gi.content_count, gt.thumb_url, gs.total_shows, gs.total_ctr, gd.alt, gd.description, gd.custom_var1, gd.custom_var2, gd.custom_var3 FROM rot_gallery_info AS gi JOIN rot_gallery_stats as gs on gs.gallery_id = gi.gallery_id JOIN rot_gallery_data1 as gd on gd.gallery_id = gi.gallery_id JOIN rot_thumbs AS gt ON gt.gallery_id = gi.gallery_id WHERE gi.gallery_type = 1 and gi.source_url = '' /* site_id */ and content_type = '0' /* set_id */ . (www.aporns.com) ' in /home/aporns/aporns.com/scj2/includes/db_modules/mysql.php:129 Stack trace: #0 /home/aporns/aporns.com/scj2/includes/db_modules/mysql.php(160): db_error('SELECT gs.thumb...', 1146, 'Table 'tc_aporn...', 'db_link') #1 /home/aporns/aporns.com/scj2/includes/libs/tpl_functions.php(689): db_query() #2 /home/aporns/aporns.com in /home/aporns/aporns.com/scj2/includes/db_modules/mysql.php on line 129
Из нестандартного, там был слейв у этого домена.. после переноса я отресетил базу слейва и , затем, удалил её за ненадобностью. но в рамках скрипта это вполне должны быть легальные действия.
admin
Site Admin
Posts: 38004
Joined: Wed Sep 10, 2008 11:43 am

Re: Fatal error: Uncaught exception 'Exception' with message 'Mysql error:: 1054 (Unknown column 'max_ctr' in 'order cla

Post by admin »

Скиньте кеш и куки и будет ок
Don't forget to run script update
Post Reply