Ask a Question related to PHP Bugs, Design and Development.
-
iliaa@php.net #1
#36798 [Opn->Csd]: mysql error when using named parameters in a query with high ascii
ID: 36798
Updated by: [email]iliaa@php.net[/email]
Reported By: albert at jool dot nl
-Status: Open
+Status: Closed
Bug Type: PDO related
Operating System: Debian Sarge
PHP Version: 5.1.2
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
[url]http://snaps.php.net/[/url].
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2006-03-22 19:53:09] albert at jool dot nl
Charset of the connection is default ISO-8859-1 (you need to explicitly
set another charset in the dsn), and the charset of any mysql table used
is default latin1 - if any solution requires changing any of these
settings, consider changing PHP first :).
Anyhow, notice that the query _parsing_ fails, not the query itself.
The double-quote fix isn't working btw - the error just didn't show up
anymore as output (which is also strange!).
------------------------------------------------------------------------
[2006-03-21 15:41:47] [email]iliaa@php.net[/email]
What is the charset of the server/connection?
------------------------------------------------------------------------
[2006-03-20 16:53:28] albert at jool dot nl
oops, changed the summary
------------------------------------------------------------------------
[2006-03-20 16:52:34] albert at jool dot nl
Tried the snapshot, and the problem still exists. Perhaps you aren't
seeing the error because you need to explicitly set exception
handling:
$db = new PDO("mysql:host=$dbHost;dbname=$dbName", $dbUser, $dbPass);
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
[.. and then the code ..]
------------------------------------------------------------------------
[2006-03-20 15:59:03] [email]tony2001@php.net[/email]
Please try using this CVS snapshot:
[url]http://snaps.php.net/php5.1-latest.tar.gz[/url]
For Windows:
[url]http://snaps.php.net/win32/php5.1-win32-latest.zip[/url]
Can't reproduce.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
[url]http://bugs.php.net/36798[/url]
--
Edit this bug report at [url]http://bugs.php.net/?id=36798&edit=1[/url]
iliaa@php.net Guest
-
error: 'Lost connection to MySQL server during query'
I have tried installing MySQL on RedHat 9 using instructions in INSTALL-BINARY and am getting the following error when trying to finish installing... -
high ascii find and replace
Hi, I am trying to create an extension that will allow me to search for all high ascii characters and replace them with low ascii equivalents. ... -
mysql query error
<cfquery name="results" datasource="urbanfiles" dbtype="JDBC"> SELECT combobox FROM cb_items </cfquery> the status is Ok when I verify all... -
#26280 [Bgs]: update query cut off with ascii char > 128
ID: 26280 User updated by: jochen dot daum at cabletalk dot co dot nz Reported By: jochen dot daum at cabletalk dot co dot nz... -
Blocks, eval and named parameters
Hello, So I was reading the brief discussion on named parameters in the gigantic troll-fueled thread (forward note, the hash option wasn't...



Reply With Quote

