php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #70988 preapared statements not doing the job
Submitted: 2015-11-27 20:35 UTC Modified: 2015-11-28 18:14 UTC
From: birger at bredelund dot dk Assigned:
Status: Closed Package: MySQLi related
PHP Version: Next Minor Version OS: win7
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: birger at bredelund dot dk
New email:
PHP Version: OS:

 

 [2015-11-27 20:35 UTC] birger at bredelund dot dk
Description:
------------
---
From manual page: http://www.php.net/mysqli-stmt.bind-param
---
preapared statements can not update single characters - varchar(1) - or enum constructed from single charaters.
No error is reported - neitehr stsmt nor mysqli objects - database is simply not updated.

PHP 5.5.12 (wamp 2.4.9)

Had to change db-definitions to use varchar(2) insted.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-11-28 00:58 UTC] requinix@php.net
-Status: Open +Status: Feedback -Type: Documentation Problem +Type: Bug
 [2015-11-28 00:58 UTC] requinix@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.


 [2015-11-28 18:14 UTC] birger at bredelund dot dk
-Status: Feedback +Status: Closed
 [2015-11-28 18:14 UTC] birger at bredelund dot dk
Sorry, but this is not correct.
Had a lot of problems with the database, but this issue is solved.
Somebody used $string[$idx]='' to remove start and finishing quotes from the string sent to database.
Doesn't show up when string is printed on screen, but the "null-characters" are still there - in the string in php and also in the data stored in the database.
So everything is actually functioning as intended - just not as expected, and it doesn't look right.

Very sorry for the inconvenience.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 16 23:01:33 2025 UTC