我想知道a.*, c.name, ... a.access等的含义。换句话说,当我在点号前面加一个字母并使用点号时,我到底是在引用什么,点号的作用是什么。
以下是我发现这种情况的代码示例:
以下是我发现这种情况的代码示例:
$query = "SELECT a.*, c.name as categoryname,c.id as categoryid, ".
"c.alias as categoryalias, c.params as categoryparams".
" FROM #__k2_items as a".
" LEFT JOIN #__k2_categories c ON c.id = a.catid";
$query .= " WHERE a.published = 1"
." AND a.access <= {$aid}"
." AND a.trash = 0"
." AND c.published = 1"
." AND c.access <= {$aid}"
." AND c.trash = 0"
;
#__k2_items
是指什么?#
是MySQL的注释分隔符,我很确定表名在SQL查询中不是字面意思。 - BoltClock#__
将被该安装程序中存储的前缀所替代(由配置文件定义)... - ircmaxell