private function prepareStatement($query, $parameters) {
            $stmt = $this->db_connection->prepare($query);

            if (!empty($parameters)) {
                foreach ($parameters as $key => $val) {
                    $stmt->bindValue($key, $val);
                }
            }

            return $stmt;
        }
private function prepareStatement($query, $parameters) {
            $stmt = $this->db_connection->prepare($query);

            if (!empty($parameters)) {
                foreach ($parameters as $key => $val) {
                    $stmt->bindValue($key, $val);
                }
            }

            return $stmt;
        }
private function prepareStatement ( $ query , $ parameters ) { $ stmt = $ this -> db_connection -> prepare ( $ query ) ; if ( ! empty ( $ parameters ) ) { foreach ( $ parameters as $ key => $ val ) { $ stmt -> bindValue ( $ key , $ val ) ; } } return $ stmt ; }
Convert a string query and parameters
to a PDO Statement

@param $query
@param $parameters

@return PDOStatement
Convert a string query and parameters to a PDO Statement