[prev in list] [next in list] [prev in thread] [next in thread]
List: php-db
Subject: Re: [PHP-DB] updating date field
From: Chris <dmagick () gmail ! com>
Date: 2006-11-21 5:38:40
Message-ID: 456290E0.4070606 () gmail ! com
[Download RAW message or body]
John Pillion wrote:
> [sorry, I failed to cc the list]
>
>
>> You have sql injection bugs waiting to happen here.
>>
>> make sure the eventid is an integer at least:
>>
>> ..." . (int)$_GET['eventid'] . "'";
>>
>> And I also suggest reading up about escaping strings
>> (http://php.net/mysql_real_escape_string &
>> http://php.net/mysql_escape_string).
>
>
> Thanks, I'll take care of that.
>
>
>
>
>> I was going to suggest it's an invalid date-format but that looks fine.
>>
>> What is eventdate? a date field, a timestamp, other ?
>
>
> It's a date field. I'm doing the same thing with other tables, and don't
> have any trouble when inserting the date, it seems to only be when
> updating. I've even tried doing the query from the phpMyAdmin - and again,
> it seems to execute ok, and doesn't return any errors, but the date gets
> lost. I haven't tried updating *only* the date field from phpMyAdmin -
> I'll
> try that tomorrow
Another thing to check - does it have a default on that field? Maybe try
removing that and see what happens?
--
Postgresql & php tutorials
http://www.designmagick.com/
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic