Thread: Where clause
View Single Post
  #4  
Old 04-16-2012, 12:43 AM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 616,311
Hall of Famer is on a distinguished road
Default

Oh I see, this is because whenisavail field is present in both columns. The trick here is:

PHP Code:
$stmt $adopts->join("adoptables_conditions""adoptables_conditions.id = adoptables.id")
               ->
select("adoptables", array(), constant(PREFIX)."adoptables.whenisavail = 'shop'"); 
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote