我使用它来获取名为“device_token”的列并将值保存到数组中:
mysql_connect("localhost", "xxxx", "xxxx") or die ("Not connected");
mysql_select_db("xxxxx") or die ("no database");
$query = "SELECT xxxx_device_token FROM device_tokens";
$result_array = array();
while($row = mysql_fetch_assoc($result))
{
$result_array[] = $row['xxxx_device_token'];
}
print_r($result_array);
但我得到的只是一个空数组,有什么问题?