Error: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'Array' in 'on clause'
fatal_error(array (
  0 => 'SQLSTATE[42S22]: Column not found: 1054 Unknown column \'Array\' in \'on clause\'',
)) at /home/theatrep/framework/lib/model.class.php:79
query(array (
  0 => '(SELECT
						b.id,
						b.title,
						b.date_start,
						b.read_url,
						b.download_url,
						b.buy_url,
						b.photo
					FROM books AS b
						JOIN books_bios AS bb ON (bb.bio_id = Array AND bb.book_id = b.id)
					)

					UNION ALL

					(SELECT
						n.id,
						n.title,
						n.date_start,
						n.author,
						n.url_name,
						n.article_title,
						n.photo
					FROM news_items AS n
						JOIN news_items_bios AS nb ON (nb.bio_id = Array AND nb.news_item_id = n.id)
					WHERE n.published = 1
					)

					ORDER BY date_start DESC;',
)) at /home/theatrep/app/app_model.php:23
find(array (
  0 => 
  array (
    'query' => '(SELECT
						b.id,
						b.title,
						b.date_start,
						b.read_url,
						b.download_url,
						b.buy_url,
						b.photo
					FROM books AS b
						JOIN books_bios AS bb ON (bb.bio_id = Array AND bb.book_id = b.id)
					)

					UNION ALL

					(SELECT
						n.id,
						n.title,
						n.date_start,
						n.author,
						n.url_name,
						n.article_title,
						n.photo
					FROM news_items AS n
						JOIN news_items_bios AS nb ON (nb.bio_id = Array AND nb.news_item_id = n.id)
					WHERE n.published = 1
					)

					ORDER BY date_start DESC;',
  ),
)) at /home/theatrep/app/models/bios.php:104
getArticles(array (
  0 => 'Array',
)) at /home/theatrep/app/controllers/bios_controller.php:83
getProfile(array (
  0 => 'Array',
  1 => 'staff',
)) at /home/theatrep/app/controllers/bios_controller.php:60
print_profile(array (
)) at /home/theatrep/framework/lib/dispatcher.class.php:153
execController(array (
  0 => 
  bios_controller::__set_state(array(
     'uses' => 
    array (
    ),
     'model_names' => 
    array (
      0 => 'bios',
      1 => 'bio_categories',
      2 => 'menu',
      3 => 'contents',
      4 => 'offices',
      5 => 'careers',
    ),
     'model' => 
    array (
      'bios' => 
      bios::__set_state(array(
         'name' => 'bios',
         'relationships' => 
        array (
        ),
         'validate' => 
        array (
        ),
         'recursive' => 1,
      )),
      'bio_categories' => 
      bio_categories::__set_state(array(
         'name' => 'bio_categories',
         'relationships' => 
        array (
        ),
         'validate' => 
        array (
        ),
         'recursive' => 1,
      )),
      'menu' => 
      menu::__set_state(array(
         'name' => 'menu',
         'relationships' => 
        array (
        ),
         'validate' => 
        array (
        ),
         'recursive' => 1,
      )),
      'contents' => 
      contents::__set_state(array(
         'name' => 'contents',
         'relationships' => 
        array (
        ),
         'validate' => 
        array (
        ),
         'recursive' => 1,
      )),
      'offices' => 
      offices::__set_state(array(
         'name' => 'offices',
         'relationships' => 
        array (
        ),
         'validate' => 
        array (
        ),
         'recursive' => 1,
      )),
      'careers' => 
      careers::__set_state(array(
         'name' => 'careers',
         'relationships' => 
        array (
        ),
         'validate' => 
        array (
        ),
         'recursive' => 1,
      )),
    ),
     'view_vars' => 
    array (
      'main_nav' => 
      array (
        0 => 
        array (
          'id' => '1',
          'parent_id' => '0',
          'name' => 'Company',
          'url_path' => '/about',
        ),
        1 => 
        array (
          'id' => '2',
          'parent_id' => '0',
          'name' => 'people',
          'url_path' => '/people',
        ),
        2 => 
        array (
          'id' => '3',
          'parent_id' => '0',
          'name' => 'projects',
          'url_path' => '/projects',
        ),
        3 => 
        array (
          'id' => '4',
          'parent_id' => '0',
          'name' => 'news',
          'url_path' => '/news',
        ),
        4 => 
        array (
          'id' => '5',
          'parent_id' => '0',
          'name' => 'resources',
          'url_path' => '/resources',
        ),
        5 => 
        array (
          'id' => '6',
          'parent_id' => '1',
          'name' => 'About us',
          'url_path' => '/company/about',
        ),
        6 => 
        array (
          'id' => '7',
          'parent_id' => '1',
          'name' => 'services',
          'url_path' => '/company/services',
        ),
        7 => 
        array (
          'id' => '8',
          'parent_id' => '1',
          'name' => 'history',
          'url_path' => '/company/history',
        ),
        8 => 
        array (
          'id' => '9',
          'parent_id' => '1',
          'name' => 'awards',
          'url_path' => '/company/awards',
        ),
        9 => 
        array (
          'id' => '10',
          'parent_id' => '1',
          'name' => 'contact us',
          'url_path' => '/company/contact',
        ),
        10 => 
        array (
          'id' => '11',
          'parent_id' => '2',
          'name' => 'our team',
          'url_path' => '/people/our_team',
        ),
        11 => 
        array (
          'id' => '12',
          'parent_id' => '2',
          'name' => 'leadership',
          'url_path' => '/people/leadership',
        ),
        12 => 
        array (
          'id' => '14',
          'parent_id' => '2',
          'name' => 'staff',
          'url_path' => '/people/staff',
        ),
        13 => 
        array (
          'id' => '15',
          'parent_id' => '2',
          'name' => 'Join our team',
          'url_path' => '/people/join_our_team',
        ),
        14 => 
        array (
          'id' => '16',
          'parent_id' => '3',
          'name' => 'featured projects',
          'url_path' => '/projects/featured_projects',
        ),
        15 => 
        array (
          'id' => '71',
          'parent_id' => '3',
          'name' => 'Projects in Progress',
          'url_path' => '/projects/in_progress',
        ),
        16 => 
        array (
          'id' => '17',
          'parent_id' => '3',
          'name' => 'browse projects',
          'url_path' => '/projects/browse_projects',
        ),
        17 => 
        array (
          'id' => '18',
          'parent_id' => '3',
          'name' => 'search projects',
          'url_path' => '/projects/search_projects_form',
        ),
        18 => 
        array (
          'id' => '20',
          'parent_id' => '4',
          'name' => 'latest news',
          'url_path' => '/news/latest_news',
        ),
        19 => 
        array (
          'id' => '21',
          'parent_id' => '4',
          'name' => 'news archive',
          'url_path' => '/news/news_archive',
        ),
        20 => 
        array (
          'id' => '23',
          'parent_id' => '4',
          'name' => 'search news',
          'url_path' => '/news/search_news_form',
        ),
        21 => 
        array (
          'id' => '27',
          'parent_id' => '5',
          'name' => 'publications',
          'url_path' => '/resources/publications',
        ),
        22 => 
        array (
          'id' => '26',
          'parent_id' => '5',
          'name' => 'Ideas & info',
          'url_path' => '/resources/ideas_info',
        ),
        23 => 
        array (
          'id' => '25',
          'parent_id' => '5',
          'name' => 'links',
          'url_path' => '/resources/links',
        ),
      ),
      'header_img' => '/files/slides/interior_24.jpg',
    ),
     'route' => 
    array (
      'controller' => 'bios',
      'action' => 'print_profile',
      'layout' => 'print_bio',
      'view' => 'print_profile',
      'params' => 
      array (
        'pid' => 'Array',
      ),
      'is_ajax' => false,
      'cache' => false,
      'title' => 'Bio',
    ),
     'params' => 
    array (
      'pid' => 'Array',
    ),
     'data' => 
    array (
    ),
     'bios' => 
    bios::__set_state(array(
       'name' => 'bios',
       'relationships' => 
      array (
      ),
       'validate' => 
      array (
      ),
       'recursive' => 1,
    )),
     'bio_categories' => 
    bio_categories::__set_state(array(
       'name' => 'bio_categories',
       'relationships' => 
      array (
      ),
       'validate' => 
      array (
      ),
       'recursive' => 1,
    )),
     'menu' => 
    menu::__set_state(array(
       'name' => 'menu',
       'relationships' => 
      array (
      ),
       'validate' => 
      array (
      ),
       'recursive' => 1,
    )),
     'contents' => 
    contents::__set_state(array(
       'name' => 'contents',
       'relationships' => 
      array (
      ),
       'validate' => 
      array (
      ),
       'recursive' => 1,
    )),
     'offices' => 
    offices::__set_state(array(
       'name' => 'offices',
       'relationships' => 
      array (
      ),
       'validate' => 
      array (
      ),
       'recursive' => 1,
    )),
     'careers' => 
    careers::__set_state(array(
       'name' => 'careers',
       'relationships' => 
      array (
      ),
       'validate' => 
      array (
      ),
       'recursive' => 1,
    )),
     'isAjax' => false,
  )),
  1 => 'print_profile',
  2 => 
  array (
    'controller' => 'bios',
    'action' => 'print_profile',
    'layout' => 'print_bio',
    'view' => 'print_profile',
    'params' => 
    array (
      'pid' => 'Array',
    ),
    'is_ajax' => false,
    'cache' => false,
    'title' => 'Bio',
  ),
  3 => 
  array (
    'pid' => 'Array',
  ),
  4 => 
  array (
  ),
)) at /home/theatrep/framework/lib/dispatcher.class.php:92
run(array (
  0 => 
  array (
    'app_controller' => '/home/theatrep/app/config/../app_controller.php',
    'controller' => '/home/theatrep/app/config/../controllers/bios_controller.php',
    'layout' => '/home/theatrep/app/config/../views/en/layouts/print_bio.php',
    'view' => '/home/theatrep/app/config/../views/en/bios/print_profile.php',
  ),
)) at /home/theatrep/framework/lib/core.class.php:42
dispatch(array (
)) at /home/theatrep/framework/lib/init.php:19
include(array (
  0 => '/home/theatrep/framework/lib/init.php',
)) at /home/theatrep/public_html/index.php:3