Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> czy zmiana wersji bazy ma wpływ na składnie zapytania do bazy, błąd przy zapytaniu do bazy
juzer
post 17.06.2008, 11:16:55
Post #1





Grupa: Zarejestrowani
Postów: 42
Pomógł: 0
Dołączył: 6.10.2004
Skąd: Mysłowice

Ostrzeżenie: (0%)
-----


po zmianie wersji na PHP 5 i PostgreSQL 8.2

przy zapytaniu do bazy
  1. <?php
  2. $SQL = "select * from exclude_time "; 
  3. $SQL.= "where to_timestamp((select current_date) || (select current_time), 'YYYY-DD-MMHH24:MI:SS') between ";
  4. $SQL.= "to_timestamp(exclude_time_from_date || exclude_time_from_time, 'YYYY-DD-MMHH24:MI:SS') and ";
  5. $SQL.= "to_timestamp(exclude_time_to_date || exclude_time_to_time, 'YYYY-DD-MMHH24:MI:SS') and ";
  6. $SQL.= "exclude_time_page_id = $PageId";
  7. ?>


wyskoczył mi błąd w postaci

  1. 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
  2. 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.)
  3. Session halted.

Doradźcie co z tym zrobić.

Ten post edytował juzer 17.06.2008, 11:23:14
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 19.07.2025 - 03:07