我从未使用过这样的PHP / MYSQL技巧来加入multitables。请谁有此领域的经验帮助:
$qry=mysql_query("select {$table_prefix}user_cv.*, {$table_prefix}advertising.* from {$table_prefix}user_cv, {$table_prefix}advertising where {$table_prefix}user_cv.publish='yes' and {$table_prefix}advertising.publish='Y'");
mysql查询返回0结果。
答案 0 :(得分:0)
$qry = "SELECT {$table_prefix}user_cv.*, {$table_prefix}advertising.*
FROM {$table_prefix}user_cv
LEFT JOIN {$table_prefix}advertising ON {$table_prefix}advertising.publish='Y'
WHERE {$table_prefix}user_cv.publish='yes'";
mysql_query($qry);
我没试过这个!我可能错了,但这可能是朝着正确方向迈出的一步。 (还是新的自己)