是否可以将所有列绑定到php中bind_result中的数组

时间:2017-02-08 06:18:42

标签: php

我是php的新手..

bool mysqli_stmt::bind_result ( mixed &$var1 [, mixed &$... ] )

我想将结果绑定到数组是否可能..

if($stmt = $mysqli->prepare('select * from tbl_reelimage where hash=?')) {
    $stmt->bind_param('s', $hash);
    $stmt->execute();
    $array= array();
    $stmt->bind_result($array);
    while($stmt->fetch()) {
        print_r($array);
    }
}

我收到此错误

mysqli_stmt::bind_result(): Number of bind variables doesn't match number of fields in prepared statement in

0 个答案:

没有答案