Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果我有两个表,有列
TABLE 1: [_id,info] TABLE 2: [_id,date]
并进行连接如何解决结果游标中 _id 列的歧义并仅访问表 2 的列 _id?
通常,如果您有不明确的列名,您可以使用别名来区分它们。
SELECT t1._id as t1_id, t2._id as t2_id FROM ... JOIN ...
在这种情况下,我猜你正在加入 _id 字段相等。然后您只能选择一次:
SELECT T2._id as id T1.info, T2.date FROM table1 AS T1 JOIN table2 AS T2 ON T1._id = T2._id
我认为我已经习惯了关于项目中 PHP 声明的相当自由的政策 - 我一直只是使用:
<? // here is my php code ?>
我只是在 FastCGI 下使用 PHP-FPM 设置了一个 nginx 服务器,现在它需要我明确声明:
<?php // here is my php code ?&