Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE » How To » Search for field in related table
Search for field in related table [message #675] Tue, 13 March 2007 12:19 Go to previous message
janalwin is currently offline  janalwin
Messages: 17
Registered: May 2006
Location: Groningen
Junior Member
Hallo,

Is it possible to do a search on a field from a related table?

I have a table with product,brands, and products_brands. Some products are conversion sets for other brands. These relations are placed in product_brands.

If i search a brand, I also want to find the conversionsets for this brand.

This is a simplefied version what i've tried to do:
$sql_from= "product LEFT JOIN products_brands ON product.product_id=product_brands.product_id "; 
....
$where="brand_id='2'  OR products_brands.brand_id='2'"
$x=getData($where)



The product_brands.brands_id part seems to get lost in the _sqlAssembleWhere function of std.table.class.inc.

I've tried adding a fieldspec for products_brands.brand_id to the product table, but this didn't help.


 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Use a popup from a navigation button
Next Topic: Dynamic Report Column Headings
Goto Forum:
  


Current Time: Tue Apr 30 14:22:04 EDT 2024

Total time taken to generate the page: 0.01023 seconds