可以阻止MySQL在“UNCOMPRESS”之后重命名密钥吗?

时间:2012-07-16 19:12:48

标签: php mysql associative compression

所以我将一些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''UNCOMPRESS(table_row)'

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

1 个答案:

答案 0 :(得分:2)

$query = "SELECT UNCOMPRESS(table_row) AS table_row 
          FROM database WHERE this = 'that'";