1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Get hosting IP address in psa database

Discussion in 'Plesk 11.x for Linux' started by Samuelcr, Jan 30, 2013.

  1. Samuelcr

    Samuelcr New Pleskian

    15
    60%
    Joined:
    Nov 29, 2010
    Messages:
    2
    Likes Received:
    0
    Hello,

    I guess a change in psa has been made in this version.

    In previous versions i could get IP address with hosting.ip_address_id pointing to IP_Addresses table.

    Now this reference is always "0". Where can i find that relationship now?

    Thank!
     
  2. Samuelcr

    Samuelcr New Pleskian

    15
    60%
    Joined:
    Nov 29, 2010
    Messages:
    2
    Likes Received:
    0
    I answer to mysqelf.

    Form some mysterious reason that relationship is now in dom_param.

    dom_id points to hosting.dom_id
    look for a param = 'ip_addr_id'
    Its value points to IP_Addresses.

    So, for example...

    SELECT domains.name, IP_Addresses.ip_address
    FROM domains
    INNER JOIN hosting ON domains.id = hosting.dom_id
    INNER JOIN dom_param ON hosting.dom_id = dom_param.dom_id AND dom_param.param = 'ip_addr_id'
    INNER JOIN IP_Addresses ON dom_param.val = IP_Addresses.id

    A pain in the *** to obtain consistently the IP through versions... tough...
     
Loading...