note 78193 rejected from function.odbc-execute by ezyang
| From: | ezyang@php.net | Date: | Wed, 03 Oct 2007 01:21:18 +0000 |
| Subject: | note 78193 rejected from function.odbc-execute by ezyang | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-131003@lists.php.net to get a copy of this message | ||
Note Submitter: makokies at yahoo dot com
----
¿How can I pass a datetime parameter to odbc_execute?
If I do it this:
$desde=isset($_POST["DesdeFec"]) ?
"'".$_POST["DesdeFec"]."'" : null;
$hasta=isset($_POST["HastaFec"]) ?
"'".$_POST["HastaFec"]."'" : null;
throws Warning: odbc_execute() [function.odbc-execute]: Can't open file 2/10/2007 18:45:00
If I do it in this other way:
$desde=isset($_POST["DesdeFec"]) ? $_POST["DesdeFec"] : null;
$hasta=isset($_POST["HastaFec"]) ? $_POST["HastaFec"] : null;
Throws:
Warning: odbc_execute() [function.odbc-execute]: SQL error: [Microsoft][ODBC SQL Server Driver]Valor
de carácter no válido para especificación cast, SQL state 22005 in SQLExecute
So... ¿how can I pass datetime parameters to odbc_execute?