Have you print out the query resulted and manually tried in phpMyAdmin? Maybe there is the problem. Anyway, it's better for you to use left join, right join to do what you want to do -- ------------------------------------------------- Cristian MARIN - Developer InterAKT Online (www.interakt.ro) Tel: +4021 312.53.12 Tel/Fax: +4021 312.51.91 cristic@interakt.ro "Addison Ellis" <addison@bellsouth.net> wrote in message news:a05010405bb2604949504@[66.20.109.38]... > hello and thank you for your time... > any ideas why this isn't working? > thank you again. best regards, addison > > <? > $query = "select * from stores,subcategory,category where > stores.category = $crow->id and subcategory.category = $crow->id and > (stores.city = '$city' and stores.state = '$state') and que='checked' > order by 'name'"; > $result = mysql_query($query) or die(mysql_error()); > while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) > { > $count++; > ?> > > // url of site with problem: http://www.momandpopcentral.com - select > a category(arts & crafts) and state(TN) -next page enter > city(nashville) there is a test store in the db that will not appear. > -- > Addison Ellis > small independent publishing co. > 114 B 29th Avenue North > Nashville, TN 37203 > (615) 321-1791 > addison@bellsouth.net > info@smipco.com > subsidiaries of small independent publishing co. > info@gloabaldog.com > info@momandpocentral.com > addisonellis.com > > THIS E-MAIL AND ANY FILES TRANSMITTED WITH IT ARE CONFIDENTIAL AND > ARE INTENDED SOLELY FOR THE INDIVIDUAL OR ENTITY TO WHOM THEY ARE > ADDRESSED. IF YOU ARE NOT THE INTENDED RECIPIENT, PLEASE DO NOT > READ, COPY OR RE-TRANSMIT THIS COMMUNICATION BUT DESTROY IT > IMMEDIATELY. ANY UNAUTHORIZED DISSEMINATION, DISTRIBUTION OR COPYING > OF THIS COMMUNICATION IS STRICTLY PROHIBITED. > A -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php