po zmianie wersji na PHP 5 i PostgreSQL 8.2
przy zapytaniu do bazy
<?php
$SQL = "select * from exclude_time ";
$SQL.= "where to_timestamp((select current_date) || (select current_time), 'YYYY-DD-MMHH24:MI:SS') between ";
$SQL.= "to_timestamp(exclude_time_from_date || exclude_time_from_time, 'YYYY-DD-MMHH24:MI:SS') and ";
$SQL.= "to_timestamp(exclude_time_to_date || exclude_time_to_time, 'YYYY-DD-MMHH24:MI:SS') and ";
$SQL.= "exclude_time_page_id = $PageId";
?>
wyskoczył mi błąd w postaci
Database error: Invalid SQL: select * from exclude_time where to_timestamp((select current_date) || (select current_time), 'YYYY-DD-MMHH24:MI:SS') between to_timestamp(exclude_time_from_date || exclude_time_from_time, 'YYYY-DD-MMHH24:MI:SS') and to_timestamp(exclude_time_to_date || exclude_time_to_time, 'YYYY-DD-MMHH24:MI:SS') and exclude_time_page_id = 15
PostgreSQL Error: 1 (ERROR: operator does not exist: date || time with time zone at character 69 HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.)
Session halted.
Doradźcie co z tym zrobić.
Ten post edytował juzer 17.06.2008, 11:23:14