Database::query



Unknown column 'c.id' in 'where clause'
SELECT DISTINCT (a.title) ,a.id, a.slug FROM albums a WHERE c.id = '3' ORDER BY RAND() LIMIT 0, 6

Action: article->archive(Array ( [0] => 3 ) )
DEBUG TRACE
Array
(
    [type] => 8
    [message] => Undefined variable: in_clause
    [file] => /var/www/html/saica/controllers/article_controller.php
    [line] => 173
)

Array ( [0] => Array ( [file] => /var/www/html/saica/framework/database.php [line] => 40 [function] => Error [args] => Array ( [0] => Database::query [1] => Unknown column 'c.id' in 'where clause'
SELECT DISTINCT (a.title) ,a.id, a.slug FROM albums a WHERE c.id = '3' ORDER BY RAND() LIMIT 0, 6 ) ) [1] => Array ( [file] => /var/www/html/saica/models/album.php [line] => 35 [function] => query [class] => Database [type] => :: [args] => Array ( [0] => SELECT DISTINCT (a.title) ,a.id, a.slug FROM albums a WHERE c.id = '3' ORDER BY RAND() LIMIT 0, 6 ) ) [2] => Array ( [file] => /var/www/html/saica/controllers/article_controller.php [line] => 184 [function] => search [class] => Album [type] => :: [args] => Array ( [0] => c.id = '3' [1] => 0 [2] => 6 [3] => RAND() ) ) [3] => Array ( [file] => /var/www/html/saica/index.php [line] => 75 [function] => archive [class] => ArticleController [object] => ArticleController Object ( [topics:ArticleController:private] => Array ( [0] => News [1] => Share discussion [2] => Tips and Tricks [3] => General ) [per_page:ArticleController:private] => 3 [articles_per_page:ArticleController:private] => 5 [config] => Array ( [public_holidays] => Array ( [2015-04-03] => Good Friday [2015-04-06] => Family Day [2015-04-27] => Freedom Day [2015-05-01] => Workers' Day [2015-06-16] => Youth Day [2015-08-10] => National Women's Day [2015-09-24] => Heritage Day ) [database] => Array ( [username] => shinji@sv-db-server [database] => saica [cache] => 1 [server] => sv-db-server.mysql.database.azure.com [password] => Ut@w@r3rum0n0 ) [storage] => Array ( [folder] => Saica ) [cache] => Array ( [storage] => file [lifetime] => 120 [cache_dir] => /var/www/html/saica/tmp/cache [servers] => Array ( ) [compress] => 0 [persistent] => 0 ) [error] => Array ( [display] => 1 [mail] => 0 [mail_to] => Array ( [0] => ruan@studentvillage.co.za [1] => jaco@svo.co.za ) [error_page] => /error/unexpected ) [compressor] => Array ( [enabled] => 0 [username] => 21232f297a57a5a743894a0e4a801fc3 [password] => 887c2b4cd4563c224f0865d68bf3597b [cache_dir] => /var/www/html/saica/tmp/compressor [ignore_list] => ) [site] => Array ( [email_from] => Saica [email_noreply] => noreply@saica.co.za [email_contact_us] => Array ( [0] => ruan@studentvillage.co.za ) [name] => Saica [domain] => http://saica.sv.co.za/ [root] => /var/www/html/saica/ ) [template] => Array ( [theme] => saica [cache] => 0 ) [facebook] => Array ( [secert_key] => 4e41aaadbaecad18bce40cec01a586b7 [app_id] => 1467312250231621 [api_key] => adc9028716cfa658f5f8ff575c359f9b [access_token] => 101218060227915|Gf1RsQ8bfH9NEXyW6UPDjHrAb8I ) [posterous] => Array ( [site] => studentnews [user_id] => 828889 ) [language] => en_GB ) [home_id:protected] => 54 [featured_id:protected] => 40 [case_studies_id:protected] => 41 [testimonial_id:protected] => 42 [marketing_album_id:protected] => 15 [discount_album_id:protected] => 16 [in_the_news:protected] => 52 [cache] => Array ( ) [cache_id] => [helpers] => Array ( [agent] => agent Object ( [info:agent:private] => ) ) [controller_name] => article [method_name] => archive [args] => Array ( [0] => 3 ) [template] => Template Object ( [view:Template:private] => article_archive.tpl [theme:Template:private] => saica [compress:Template:private] => 0 [template_dir] => /var/www/html/saica/views/saica [compile_dir] => /var/www/html/saica/tmp/smarty/templates_c/saica [config_dir] => configs [plugins_dir] => Array ( [0] => /var/www/html/saica/views/plugins [1] => plugins [2] => \views\plugins ) [debugging] => [error_reporting] => [debug_tpl] => [debugging_ctrl] => NONE [compile_check] => 1 [force_compile] => [caching] => 0 [cache_dir] => tmp/smarty [cache_lifetime] => 3600 [cache_modified_check] => [php_handling] => 0 [security] => [secure_dir] => Array ( ) [security_settings] => Array ( [PHP_HANDLING] => [IF_FUNCS] => Array ( [0] => array [1] => list [2] => isset [3] => empty [4] => count [5] => sizeof [6] => in_array [7] => is_array [8] => true [9] => false ) [INCLUDE_ANY] => [PHP_TAGS] => [MODIFIER_FUNCS] => Array ( [0] => count ) [ALLOW_CONSTANTS] => ) [trusted_dir] => Array ( ) [left_delimiter] => { [right_delimiter] => } [request_vars_order] => EGPCS [request_use_auto_globals] => 1 [compile_id] => [use_sub_dirs] => [default_modifiers] => Array ( ) [default_resource_type] => file [cache_handler_func] => [autoload_filters] => Array ( ) [config_overwrite] => 1 [config_booleanize] => 1 [config_read_hidden] => [config_fix_newlines] => 1 [default_template_handler_func] => [compiler_file] => Smarty_Compiler.class.php [compiler_class] => Smarty_Compiler [config_class] => Config_File [_tpl_vars] => Array ( [SCRIPT_NAME] => /index.php [first_time] => 1 [template_dir] => /views/saica [user] => User Object ( [cache] => 1 [permissions:User:private] => Array ( [articleadd] => 0 [articleedit] => 0 [articleindex] => 0 [articleupdate_sort_order] => 0 [categoryadd] => 0 [categoryedit] => 0 [categoryupdate_sort_order] => 0 [formindex] => 0 [formmanager] => 0 [formdownload] => 1 [formdelete] => 0 [formpreview] => 0 [formsave_elements] => 0 [galleryupload] => 0 [galleryupdate_meta] => 0 [gallerydelete_photo] => 0 [gallerydelete_album] => 0 [galleryadd] => 0 [galleryedit] => 0 [gallerymanage] => 0 [galleryindex] => 0 [groupgenerate_permissions] => 0 [groupmanage] => 0 [groupupdate_permission] => 0 [userhome] => 0 [userlogin] => 1 [useradd] => 0 [useredit] => 0 [userindex] => 0 [userlogout] => 1 [articledelete] => 0 [categorydelete] => 0 [articleadd_brief] => 0 [articleedit_brief] => 0 [articleprocess_brief] => 0 [eventindex] => 0 [eventsend_message] => 0 [eventrsvp_update] => 0 [eventadd] => 0 [eventajax_calendar] => 0 [eventrsvp] => 0 [eventsync] => 0 [eventconfirm_attended] => 0 [eventexport] => 0 [eventquick_add] => 0 [eventresend_invite] => 0 [eventinvite] => 0 [eventinvite_contact] => 0 [eventadd_contact] => 0 [eventdelete_selected] => 0 [eventfeed] => 0 ) [facebook_secert_key:User:private] => 4e41aaadbaecad18bce40cec01a586b7 [facebook_app_id:User:private] => 1467312250231621 [validate] => Array ( [not_null] => Array ( [0] => name [1] => surname ) [email] => Array ( [0] => email ) ) [table] => users [structure] => TableStructure Object ( [columns] => Array ( [0] => id [1] => email [2] => password [3] => name [4] => surname [5] => description [6] => cell_number [7] => image [8] => created_on [9] => modified_on [10] => twitter [11] => facebook_id [12] => group_id [13] => slug [14] => domain_id ) [cache] => 1 [table] => users ) [id] => 0 [group_id] => 0 [facebook_id] => 0 ) [controller_name] => article [method_name] => archive [home_id] => 54 [can_edit_article] => [in_the_news] => Array ( ) [site_feed] => category/3 ) [_smarty_vars] => [_sections] => Array ( ) [_foreach] => Array ( ) [_tag_stack] => Array ( ) [_conf_obj] => [_config] => Array ( [0] => Array ( [vars] => Array ( ) [files] => Array ( ) ) ) [_smarty_md5] => f8d698aea36fcbead2b9d5359ffca76f [_version] => 2.6.7 [_inclusion_depth] => 0 [_compile_id] => [_smarty_debug_id] => SMARTY_DEBUG [_smarty_debug_info] => Array ( ) [_cache_info] => Array ( ) [_file_perms] => 420 [_dir_perms] => 505 [_reg_objects] => Array ( ) [_plugins] => Array ( [modifier] => Array ( ) [function] => Array ( ) [block] => Array ( [nocache] => Array ( [0] => smarty_block_nocache [1] => [2] => [3] => [4] => [5] => ) ) [compiler] => Array ( ) [prefilter] => Array ( ) [postfilter] => Array ( ) [outputfilter] => Array ( ) [resource] => Array ( ) [insert] => Array ( ) ) [_cache_serials] => Array ( ) [_cache_include] => [_cache_including] => ) [user] => User Object ( [cache] => 1 [permissions:User:private] => Array ( [articleadd] => 0 [articleedit] => 0 [articleindex] => 0 [articleupdate_sort_order] => 0 [categoryadd] => 0 [categoryedit] => 0 [categoryupdate_sort_order] => 0 [formindex] => 0 [formmanager] => 0 [formdownload] => 1 [formdelete] => 0 [formpreview] => 0 [formsave_elements] => 0 [galleryupload] => 0 [galleryupdate_meta] => 0 [gallerydelete_photo] => 0 [gallerydelete_album] => 0 [galleryadd] => 0 [galleryedit] => 0 [gallerymanage] => 0 [galleryindex] => 0 [groupgenerate_permissions] => 0 [groupmanage] => 0 [groupupdate_permission] => 0 [userhome] => 0 [userlogin] => 1 [useradd] => 0 [useredit] => 0 [userindex] => 0 [userlogout] => 1 [articledelete] => 0 [categorydelete] => 0 [articleadd_brief] => 0 [articleedit_brief] => 0 [articleprocess_brief] => 0 [eventindex] => 0 [eventsend_message] => 0 [eventrsvp_update] => 0 [eventadd] => 0 [eventajax_calendar] => 0 [eventrsvp] => 0 [eventsync] => 0 [eventconfirm_attended] => 0 [eventexport] => 0 [eventquick_add] => 0 [eventresend_invite] => 0 [eventinvite] => 0 [eventinvite_contact] => 0 [eventadd_contact] => 0 [eventdelete_selected] => 0 [eventfeed] => 0 ) [facebook_secert_key:User:private] => 4e41aaadbaecad18bce40cec01a586b7 [facebook_app_id:User:private] => 1467312250231621 [validate] => Array ( [not_null] => Array ( [0] => name [1] => surname ) [email] => Array ( [0] => email ) ) [table] => users [structure] => TableStructure Object ( [columns] => Array ( [0] => id [1] => email [2] => password [3] => name [4] => surname [5] => description [6] => cell_number [7] => image [8] => created_on [9] => modified_on [10] => twitter [11] => facebook_id [12] => group_id [13] => slug [14] => domain_id ) [cache] => 1 [table] => users ) [id] => 0 [group_id] => 0 [facebook_id] => 0 ) ) [type] => -> [args] => Array ( [0] => 3 ) ) )