Re: Problem with the type date

From: Matthew Horoschun <mhoroschun(at)canprint(dot)com(dot)au>
To: Jesus Rios <galiza-vermelha(at)wanadoo(dot)es>(by way of Jesus Rios <galiza-vermelha(at)wanadoo(dot)es>)
Cc: "POSTGRESLQ-PHP" <pgsql-php(at)postgresql(dot)org>
Subject: Re: Problem with the type date
Date: 2003-01-28 12:43:14
Message-ID: 1123DFBD-32BE-11D7-84B0-000393B3A702@canprint.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-php by date

  From Date Subject
Next Message _root.paulSutcliffe 2003-01-28 23:39:52 how to start with postgreSQL?
Previous Message Jesus Rios 2003-01-28 12:04:52 Problem with the type date