$link = mysqli_connect('localhost', 'root', '', 'mutli_page_form');
$result = mysqli_query($link, "SELECT * FROM wills_children WHERE id=77");
$row = mysqli_fetch_assoc($result);
$data = unserialize($row['children']);
错误
Warning: mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, boolean given in
似乎是什么问题?
它试图拉动的序列化数据;
a:1:{i:0;a:3:{i:0;s:15:\"Natural Chlid 1\";i:1;s:15:\"Natural Chlid 2\";i:2;s:15:\"Natural Chlid 3\";}}
答案 0 :(得分:2)
试试这个:
if ($result = mysqli_query($link, $query)) {
/* fetch associative array */
if($row = mysqli_fetch_assoc($result)) {
$data = unserialize($row['children']);
}
/* free result set */
mysqli_free_result($result);
}