sql request for list client

Discussion in 'General' started by mccharlet, Oct 2, 2007.

  1. mccharlet

    mccharlet Member HowtoForge Supporter

    Hi,

    I want create a list of the client by reseller.
    But i don't find wich table use.

    Tanks for your help
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Resellers: isp_isp_reseller
    Clients: isp_isp_kunde

    The relations for reseller > client is stored in the table isp_dep
     
  3. mccharlet

    mccharlet Member HowtoForge Supporter

    Tanks Till,

    But, I do not find logic in the isp_dep database ant client and reseller.

    Wich fields corresponds doc_id from client and reseller

    Thanks
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    It is a classic parent => child record relation. In this case, the reseller is the parent and the client is the child.

    isp_dep.parent_doc_id = isp_isp_reseller.doc_id
    isp_dep.parent_doctype_id = isp_isp_reseller.doctype_id
    isp_dep.child_doc_id = isp_isp_kunde.doc_id
    isp_dep.child_doctype_id = isp_isp_kunde.doctype_id
     
  5. mccharlet

    mccharlet Member HowtoForge Supporter

    i don't understand any more

    I have a reseller with the doc_id 4. This reseller have five client

    If i make a select on the isp_dep database, with the field isp_dep.parent_doc_id with the value 4. i have four recording.
    Three with the parent_doctype_id egal 1013 and one with 1012

    But nothing with the value 1022 (isp_reseller)

    :(
     
  6. mccharlet

    mccharlet Member HowtoForge Supporter

    up

    Help me
     

Share This Page