|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-04-10 00:40 UTC] edink@php.net
[2016-01-26 14:42 UTC] lehmann at cnm dot de
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 07 19:00:02 2025 UTC |
Description: ------------ odbc_execute has a feature whereby if the string to be inserted starts and ends with a single quote, the string is interpreted as a filename whose contents are interpreted as the value of the placeholder. There does not appear to be a way to insert a string that begins and ends with a single quote--neither backslashing nor double-quoting works, and it appears from reading the source (php_odbc.c:1014) that nothing else will either. Reproduce code: --------------- $sth = odbc_prepare($dbh, "INSERT INTO people(name) VALUES(?)"); $res = odbc_execute($sth, array('\'The Count\'')); Expected result: ---------------- The string \'The Count\' inserted into the database. Actual result: -------------- The string is interpreded as a filename, resulting in the erro "Can't open file XXX" in the error log.