i have the following request:
select * from newagenda where
debut >'$1' AND debut < date '$1' + interval '24 hours' and
agendaid=$2'
which fails with a type cast error...
failed: the error: = FEHLER: ungültige Eingabesyntax für Typ timestamp:
i try to translate: ERROR: invalid inputsyntax for type timestamp:
before i parametrized, i had
select * from newagenda where debut >'$adate' AND debut < date '$adate' +
interval '24 hours' and agendaid=$agid;
which worked perfectly well.....
now, the date comes back through a post request from a web request, so can inherently be manipulated, that's why would like to parametrize it, but i am clueless on how to get this to work.....
i tried
select * from newagenda where
debut >'$1'::DATE AND debut < date '$1'::DATE + interval '24 hours' and
agendaid=$2'
or
$largs = array($isodate."::DATE");
also
$largs = array("'".$isodate."'::DATE");
but nothing worked...... how can i get this get to work? thanks in advance!