Jump to content

query need help


angela5

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.