Re: Problem with the type date - Mailing list pgsql-php

From Matthew Horoschun
Subject Re: Problem with the type date
Date
Msg-id 1123DFBD-32BE-11D7-84B0-000393B3A702@canprint.com.au
Whole thread Raw
In response to Problem with the type date  (Jesus Rios <galiza-vermelha@wanadoo.es>(by way of Jesus Rios <galiza-vermelha@wanadoo.es>))
List pgsql-php
Hi There,

> Warning: PostgreSQL query failed: ERROR: Bad date external
> representation
> '--' in /var/www/jesus/foniatra/globals.php on line 55

Okay... so that means the variables $fecha_anho, $fecha_mes, and
$fecha_dia are empty.

I'm guessing here, but it might be because you're running a recent
version of PHP where register_globals has been turned off by default.

Try this:

$tdate =
$_REQUEST['fecha_anho']."-".$_REQUEST['fecha_mes']."-
".$_REQUEST['fecha_dia'];

Try echoing $tdate directly after this line to make sure its set
correctly.

Also, in your HTML, it is good practice to always quote parameter
values.

Matthew.

--
Matthew Horoschun
Network Administrator
CanPrint Communications Pty. Ltd.


--
Matthew Horoschun
Network Administrator
CanPrint Communications Pty. Ltd.

Mobile:        0417 282 378
Direct:        (02) 6295 4544
Telephone:    (02) 6295 4422
Facsimile:     (02) 6295 4473


pgsql-php by date:

Previous
From: Jesus Rios (by way of Jesus Rios
Date:
Subject: Problem with the type date
Next
From: "_root.paulSutcliffe"
Date:
Subject: how to start with postgreSQL?