There's one thing that confuses me when doing the JOINs, and that's which table(s) do you put after the FROM if you are SELECTing from multiple places. Like in your first reply to me, you but FROM biz AS b, and then on your second reply you put FROM bizmake AS bm and moved the biz to an INNER JOIN.
Here's the query that does everything correctly, and I am having trouble putting INNER JOINs in it.
Code:
SELECT
b.biz_id AS id, b.name AS name, b.zip AS zip,
r.$tp_score AS score, r.$tp_numposts AS numposts,
z.city AS city, z.state AS state, (POW...) AS distance
FROM
biz AS b, rating AS r, zipcodes AS z, bizmake AS bm, make AS m
WHERE
(POW(....) < ($radius*$radius) AND
b.zip = z.zip AND
r.biz_id = b.biz_id AND
bm.biz_id = b.biz_id AND
bm.make_id = m.make_id AND
m.make = '$make' AND
r.$tp_score > 0.00 AND
r.$tp_numposts > 0
ORDER BY 'score' DESC
Bookmarks