0

我从来没有做过这样的 PHP/MYSQL 技巧来加入多表。请有这方面经验的人帮忙:

$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 个结果。

4

1 回答 1

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);

我没有测试这个!我可能是错的,但这可能是朝着正确方向迈出的一步。(我自己还是新的)

于 2013-09-30T05:40:17.203 回答