我想从表中获取记录,这是代码
$mysqli = connect();
$query = "SELECT * FROM contacts WHERE contact_by = ?";
$stmt = $mysqli->prepare( $query );
print_r( $this->user_id );
$stmt->bind_param( 'i', $this->user_id );
$stmt->execute()
$list = array();
while( $row = $stmt->fetch() )
{
$contact = new data( $row );
$list[] = $contact;
print_r($list);
}
$mysqli->close();
return $list;
$row 返回“1”。