This topic is locked
[SOLVED]

 Select Distinct Column Value

2/21/2013 5:01:39 AM
PHPRunner General questions
P
phpcmk author

Just came out with a solution.

Hi,

I have 4 tables created in a database.

  • table1 (field: clientname)
  • table2 (field: clientname)
  • table3 (field: clientname)
  • table4 (field: clientname, numberoffiles)
    table1, table2, table3 will be for user to input the clientname.
    I need to show in table4 under clientname only the unique name and under numberoffiles, I need the total number of records created for that client from table1,table2,table3.
    Example:

    Table1

    1st record: ABC Pte Ltd

    2nd record: ABC Pte Ltd

    3rd record: ZZZ Pte Ltd
    Table2

    1st record: ABC Pte Ltd

    2nd record: ABC Pte Ltd

    3rd record: ZZZ Pte Ltd
    Table3

    1st record: ABC Pte Ltd

    2nd record: ABC Pte Ltd

    3rd record: ZZZ Pte Ltd
    Table4

    Clientname | Number of files

    ABC Pte Ltd 6

    ZZZ Pte Ltd 3
    Thanks.