PHP Classes

related tables

Recommend this page to a friend!

      Eyesis Data Grid Control  >  All threads  >  related tables  >  (Un) Subscribe thread alerts  
Subject:related tables
Summary:how can show fields from related tabe?
Messages:2
Author:Giuseppe Burgio
Date:2008-12-15 12:50:42
Update:2011-12-04 18:54:21
 

  1. related tables   Reply   Report abuse  
Picture of Giuseppe Burgio Giuseppe Burgio - 2008-12-15 12:50:42
Hi! excellent class.

Question:

I have...

parent table "users" with field "city_code"
child table "cities" with field "city_code" and field "city_description"

Eyesis datagrid read table "users"...
How i can show field "city_description" from related table "cities"?

Bye from Peppe.

  2. Re: related tables   Reply   Report abuse  
Picture of nugraha_isnan nugraha_isnan - 2011-12-04 18:54:21 - In reply to message 1 from Giuseppe Burgio
use inner join
$h->setQuery("*", "users inner join cities on users.city_code=cities.city_code","your_parent_table_PrimaryKey");