我有一个看起来像这样的mysql表:
id | uid | title | description | parent
1 | 1 | Portraits | desc. | photostream
2 | 1 | Abstract | descr. | photostream
我正在尝试构建一个多维数组,最终会像这样:
Array
(
[0]
[id] => 1
[uid] => 1
[title] => Portraits
[description] => desc.
[parent] => photostream
[1]
[id] => 2
[uid] => 1
[title] => Abstract
[description] => descr.
[parent] => photostream
)
我正在使用select查询:
$query = mysql_query(
"SELECT * FROM `table` WHERE `uid`='1' ORDER BY `id` DESC");
有谁知道如何做到这一点?
谢谢,
列维
|