Error with dates
Leon Brooks
leon at cclinic.com.au
Tue Sep 17 21:52:46 EDT 2002
On Tue, 17 Sep 2002 20:26, Stefan Sonnenberg-Carstens wrote:
> <?
>
> require_once("common.inc.php");
>
> $datetime = date("Y-m-d H:i:s");
>
> $conn = getConnection();
> $conn->debug = true;
>
> $sqlQuery = " INSERT INTO paymentTransactions "
> . " (LID, insertDate) "
> . " VALUES "
> . " ('1195', getdate()) ";
Maybe s/getdate()/'" . $datetime . "'/ ?
> if($conn->Execute($sqlQuery) === false) {
> echo "ERROR!\n";
> exit;
> }
>
> exit;
>
> ?>
>
> Sometimes, very strange,this error occurs :
>
> Warning: Sybase: Server message: The conversion of a char data type to a
> datetime data type resulted in an out-of-range datetime value. (severity
> 16, procedure N/A) in
> /usr/local/www/includes/adodb/drivers/adodb-mssql.inc.php on line 332 242:
> The statement has been terminated.
> ERROR!
--
Computer Clinic (WA) P/L Lasting good health for your network!
+61-8-9207-3686 http://www.cclinic.com.au/
linux.conf.au 2003 The Australian Linux Technical Conference
http://conf.linux.org.au/ 22-25 January 2003 in Perth, Western Australia
More information about the FreeTDS
mailing list