|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-02-11 05:11 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Dec 05 07:00:01 2025 UTC |
Description: ------------ You cannot bind array elements as parameters in mysqli_bind_param(). This should either be fixed or documented. :) Reproduce code: --------------- $foo[0] = 'foo'; $link = mysqli_connect("localhost", "root", "password", "test"); $stmt = mysqli_prepare($link, 'INSERT INTO t VALUES (?)'); mysqli_bind_param($stmt, array(MYSQLI_BIND_STRING), $foo[0]); mysqli_execute($stmt); Expected result: ---------------- foo is inserted into table t Actual result: -------------- no data inserted