我有两个表节点和 sort_value。在节点我有这个
+----------------+----------------+----------+----------------+
| nid | content | state | etc |
+----------------+----------------+----------+----------------+
| 1 | Nanuet | NY | some content |
+----------------+----------------+----------+----------------+
| 2 | Nanuet | NY | some content |
+----------------+----------------+----------+----------------+
在 sort_value 表中我有
+----------------+----------------+----------+
| sort_order | city | state |
+----------------+----------------+----------+
| 1 | xxxxxx | NY |
+----------------+----------------+----------+
| 2 | xxxxxx | NY |
+----------------+----------------+----------+
我只想从节点表中选择 nid 并根据 sort_value 表中的 sort_order 值对选定的 nid 进行排序。
我怎样才能做到这一点??
谢谢