note 78193 added to function.odbc-execute

From: Date: Tue, 02 Oct 2007 17:23:44 +0000
Subject: note 78193 added to function.odbc-execute
Groups: php.notes 
Request: Send a blank email to php-notes+get-130989@lists.php.net to get a copy of this message
¿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? ---- Server IP: 130.206.1.5 Probable Submitter: 62.15.134.170 ---- Manual Page -- http://www.php.net/manual/en/function.odbc-execute.php Edit -- https://master.php.net/note/edit/78193 Del: integrated -- https://master.php.net/note/delete/78193/integrated Del: useless -- https://master.php.net/note/delete/78193/useless Del: bad code -- https://master.php.net/note/delete/78193/bad+code Del: spam -- https://master.php.net/note/delete/78193/spam Del: non-english -- https://master.php.net/note/delete/78193/non-english Del: in docs -- https://master.php.net/note/delete/78193/in+docs Del: other reasons-- https://master.php.net/note/delete/78193 Reject -- https://master.php.net/note/reject/78193 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#130989) next »