sql - PHP Variable within bind-parameter -
i have following php variable:
$qstr1; this, when printed or echoed, shows following:
$q1, $q2, $q3, $q4, $q5 i have bind-parm code:
mysqli_stmt_bind_param($proc, "iss$is", $respondent_id, $ip, $browser, $q1, $q2, $q3, $q4, $q5); this works fine , saves correctly database, however, when replace individual parts variable (see below), doesn't work, doing wrong?
mysqli_stmt_bind_param($proc, "iss$is", $respondent_id, $ip, $browser, $qstr1); vardump follows:
string(49) "$q1, $q2, $q3, $q4, $q5, $q6, $q7, $q8, $q9, $q10" 
it doesn't work that. method wants several parameters. no give one, holds string.
there possibilities this, eval, advise different approach. pdo example can bind using names can called in loop.
Comments
Post a Comment