Hi,


The below is from my colleague who is not a member on this list, so I'm sending on his behalf.


I'm using MonetDB with MonetDB-PHP library.


I have followed the documentation from: https://github.com/MonetDB/MonetDB-PHP


Everything is working fine, but if I set parameter for timestamp type column I get the following error:

Error from MonetDB: 42000!Wrong type for argument 1 of function call: char, expected timestamp

For example, this is working:

$result = $connection->Query('
    select
        *
    from
        "cats"
    where
        "name" = ?
        and "weight_kg" > ?
    limit
        10', [ "D'artagnan", 5.3 ]);

but this will not work:

$result = $connection->Query('
    select
        *
    from
        "cats"
    where
        "name" = ?
        and "weight_kg" > ?
        and "birthdate" < ? // timestamp data type
    limit
        10
', [ "D'artagnan", 5.3, "2020-02-28 12:37:16" ]);

The error occurs for any column that is of timestamp type and only when passing value as parameter.


What am I doing wrong?


Thank you.

Regards,

Kevork Vartanian

This email correspondence may contain privileged information and it is intended to be transmitted to the addressee abovementioned. If you are not the intended recipient of this email correspondence, you must not distribute, copy, forward or rely upon its contents. We ask that you notify the sender of this error and immediately delete this email correspondence.