note 69134 added to function.odbc-execute

From: Date: Thu, 24 Aug 2006 11:38:09 +0000
Subject: note 69134 added to function.odbc-execute
Groups: php.notes 
Request: Send a blank email to php-notes+get-116258@lists.php.net to get a copy of this message
I have a solution for the problem with the strings beeing interpreted as filename because of the single quotes: Just add a blank to the end of the string: <?php function odbc_escape_params ($params) { if (!is_array($params) or empty($params)) { return array(); } foreach ($params as $key=>$val) { if (strlen($val) > 1 and $val{0} == "'" and $val{strlen($val)-1} == "'") { $params[$key] .= ' '; } } return $params; } ?> ---- Server IP: 66.163.161.117 Probable Submitter: 138.227.189.9 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.odbc-execute.php Edit -- https://master.php.net/note/edit/69134 Del: integrated -- https://master.php.net/note/delete/69134/integrated Del: useless -- https://master.php.net/note/delete/69134/useless Del: bad code -- https://master.php.net/note/delete/69134/bad+code Del: spam -- https://master.php.net/note/delete/69134/spam Del: non-english -- https://master.php.net/note/delete/69134/non-english Del: in docs -- https://master.php.net/note/delete/69134/in+docs Del: other reasons-- https://master.php.net/note/delete/69134 Reject -- https://master.php.net/note/reject/69134 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#116258) next »