searching child records

I have MySQL structured like this

  1. MasterTable
  2. ChildTableA
  3. ChildTableB
  4. ChildTableC
  5. ChildTableD

All child tables are related to a MasterTable through UID field.
I want to build a grid with search option which will allow to search MasterTable as well as all ChildTable’s for a string

How would I approach this issue ?

Arthur

Re: searching child records

Create query that include master and. Child table.
Using left join is. Only option that you can use.

Re: searching child records

Not the only. :-p

The best way is to use like suyonob said, cause you’ll only use 1 sql to solve your problem and you can create Group by’s on scriptcase interface to present your data(http://www.scriptcase.net/phpgenerator/videos/videos.php - Scriptcase 6 - Group by Date fields).
Or you can create a single grid on each table and use Nested Grids (http://www.scriptcase.net/phpgenerator/samples/samples.php - Nested grids using treeview) or you can create a drill down (http://www.scriptcase.net/phpgenerator/samples/samples.php - Simple drill down).

All the solutions has the same aspects: having a father, show the details … from that details, show more details …

Re: searching child records

Thanks - I will give a try. Arthur