2

所以我将一些 XML 存储在一个表中,并像这样使用 MySQL 'COMPRESS' 函数:

$query = "SELECT UNCOMPRESS(table_row) FROM database WHERE this = 'that'";
$mysqli = $this->ConnectDB();
$result = $mysqli->query($query);
$task_result = $task->fetch_assoc();

这当然有效,但是它将返回的关联数组中的键从'table_row'to重命名'UNCOMPRESS(table_row)'

有没有办法防止这种重命名?

4

1 回答 1

2
$query = "SELECT UNCOMPRESS(table_row) AS table_row 
          FROM database WHERE this = 'that'";
于 2012-07-16T19:14:44.463 回答