angela5 Posted July 15, 2007 Share Posted July 15, 2007 Please help just with this: Select all users which are in table "listingsdb" and are Not in "userfavoritelistings"... $searchSQL = "SELECT distinct(" . "listingsdb.listingsdb_id), " . "listingsdb.userdb_id, " . "listingsdb.listingsdb_title FROM " . "listingsdb, " . "userfavoritelistings " . $string_table_list . " WHERE (listingsdb_active = 'yes') " . $string_where_clause . " AND (" . "userfavoritelistings.listingsdb_id = " . "listingsdb.listingsdb_id) "; $searchSQLCount = "SELECT COUNT(distinct(" . "listingsdb.listingsdb_id)) as total_listings FROM " . "listingsdb, " . "userfavoritelistings " . $string_table_list_no_sort . " WHERE (listingsdb_active = 'yes') " . $string_where_clause_nosort . " AND (" . "userfavoritelistings.listingsdb_id = " . "listingsdb.listingsdb_id) "; Link to comment https://forums.phpfreaks.com/topic/60052-query-need-help/ Share on other sites More sharing options...
fenway Posted July 16, 2007 Share Posted July 16, 2007 Please post the actual SQL queries, not the PHP that generates them. Link to comment https://forums.phpfreaks.com/topic/60052-query-need-help/#findComment-299502 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.