select * from image where Valid=1 and gallery_fk=
Array
(
)
PDOException Object
(
    [message:protected] => 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 '' at line 1
    [string:Exception:private] => 
    [code:protected] => 42000
    [file:protected] => /var/www/html/ocp/include/db/mysql.php
    [line:protected] => 116
    [trace:Exception:private] => Array
        (
            [0] => Array
                (
                    [file] => /var/www/html/ocp/include/db/mysql.php
                    [line] => 116
                    [function] => execute
                    [class] => PDOStatement
                    [type] => ->
                )

            [1] => Array
                (
                    [file] => /var/www/html/ocp/include/db/mysql.php
                    [line] => 157
                    [function] => execute
                    [class] => Pdo_Mysql
                    [type] => ->
                )

            [2] => Array
                (
                    [file] => /var/www/html/ocp/include/db/helper.php
                    [line] => 19
                    [function] => fetchAll
                    [class] => Pdo_Mysql
                    [type] => ->
                )

            [3] => Array
                (
                    [file] => /var/www/html/php/lib/gallery.class.php
                    [line] => 22
                    [function] => con_getResults
                )

            [4] => Array
                (
                    [file] => /var/www/html/php/sessions_outside_nsrs/details.php
                    [line] => 50
                    [function] => getImages
                    [class] => gallery
                    [type] => ->
                )

            [5] => Array
                (
                    [file] => /var/www/html/ocp/siteManager/lib/blok.php
                    [line] => 423
                    [args] => Array
                        (
                            [0] => /var/www/html/php/sessions_outside_nsrs/details.php
                        )

                    [function] => require
                )

            [6] => Array
                (
                    [file] => /var/www/html/ocp/siteManager/lib/blok.php
                    [line] => 104
                    [function] => blok_display
                )

            [7] => Array
                (
                    [file] => /var/www/html/templates/inner_two_columns.php
                    [line] => 102
                    [args] => Array
                        (
                            [0] => /var/www/html/ocp/siteManager/lib/blok.php
                        )

                    [function] => require_once
                )

            [8] => Array
                (
                    [file] => /var/www/html/code/navigate.php
                    [line] => 52
                    [args] => Array
                        (
                            [0] => /var/www/html/templates/inner_two_columns.php
                        )

                    [function] => require
                )

        )

    [previous:Exception:private] => 
    [errorInfo] => Array
        (
            [0] => 42000
            [1] => 1064
            [2] => 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 '' at line 1
        )

)