Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 635779
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T20:26:33+00:00 2026-05-13T20:26:33+00:00

Running the following code: $preCallMatch = pg_prepare($dbcp, ‘callMatch’, SELECT duration FROM voip_calls WHERE system_id

  • 0

Running the following code:

$preCallMatch = pg_prepare($dbcp, 'callMatch',
                            "SELECT duration 
                               FROM voip_calls 
                              WHERE system_id = $1 
                                AND call_start => $2                                   
                                AND call_start <= $3
                                AND destination = $4");

I get the following error:

Warning: pg_prepare(): Query failed: ERROR:  operator does not exist: timestamp without time zone => "unknown"
HINT:  No operator matches the given name and argument type(s). You may need to add explicit type casts. in /home/www/dinesh/UPSReconcileZeroSecondCalls.php on line 38

I have tried casting $2 in this manner with no luck:

$preCallMatch = pg_prepare($dbcp, 'callMatch',
                            "SELECT duration 
                               FROM voip_calls 
                              WHERE system_id = $1 
                                AND call_start => CAST ( $2 AS TIMESTAMP )
                                AND call_start <= CAST ( $3 AS TIMESTAMP )
                                AND destination = $4");


Warning: pg_prepare(): Query failed: ERROR:  operator does not exist: timestamp without time zone => timestamp without time zone
HINT:  No operator matches the given name and argument type(s). You may need to add explicit type casts. in /home/www/dinesh/UPSReconcileZeroSecondCalls.php on line 38

Column types from voip_calls table:

call_start     | timestamp without time zone |
call_end       | timestamp without time zone | not null

Any tips as to what I’m doing wrong? Note, PDO or MDPD aren’t an option right now.

Versions of software:

ii  php5                            5.2.6.dfsg.1-1+lenny3      server-side, HTML-embedded scripting languag
ii  libapache2-mod-php5             5.2.6.dfsg.1-1+lenny3      server-side, HTML-embedded scripting languag
ii  php5-pgsql                      5.2.6.dfsg.1-1+lenny3      PostgreSQL module for php5
ii  libpq5                          8.3.8-0lenny1              PostgreSQL C client library
postmaster (PostgreSQL) 8.1.4
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T20:26:33+00:00Added an answer on May 13, 2026 at 8:26 pm

    It may be your => operator causing the problem – try >= instead.

    Also as a hint I find it easier to write $2::timestamp instead of CAST($2 AS TIMESTAMP) – it is a PostgreSQL-specific syntax but for me reads better (and it’s less to type 😉 )

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm running the following code to get a random entry from a dictionary: SELECT
I am running following code to create bmp image from pdf using Ghost4j i
I'm running the following code from the command line (python filename.py) and it wont
I'm running the following code: hashedUrlDataList.Select(mDalHashedUrlData.Save); I have put a breakpoint in the called
Am running the following code to gather some data from my page and store
I am running the following code to capture the live video streaming from an
Upon running the following code, in a project from F# WPF template, to which
I am running the following code; it is from the Twisted Framework's example list
I'm getting unexpected output when running following code, DateFormat df = new SimpleDateFormat(YYYY-MM-dd); Date
Running the following code, I get a StackOverflowError at the getPackage() line. How can

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.