Hi,
Here's the situation:
I've set up a PGSQL DB and it works fine (I guess 😉).
When using PHP to connect to it, there aren't any problems. Retrieving data works as well..
Now comes the tricky thing. When i write a query such as
SELECT * FROM test WHERE date >= '2002-03-01';
it will work within the PSQL prompt, but NOT when passed via PHP??? I use the following script:
$date = //stuff to get today's date .. ;
settype ($date, "string");
$query = "SELECT * FROM test WHERE date >='$date';
Now this I really do not comprehend. Perhaps you do? When, instead, I type the date instead of using a variable, it does work.
Anyway, the error I get a result:
"Warning: PostgreSQL query failed: ERROR: Bad date external representation '' in ... "
Thanks,
Jeroen