Note that there are some explanatory texts on larger screens.

plurals
  1. POMysql join request
    primarykey
    data
    text
    <p>I need to get emtpy fields where data is repeated</p> <p>For example an customer can have two or more contact persons, so query return (just shorted qyery resul):</p> <p><strong>CUSTOMER_NAME| CONTACT_PERSON|ETC..</strong></p> <pre><code> dell | Ighor |etc.. dell | Dima |etc.. </code></pre> <p>but I'm need : <strong>CUSTOMER_NAME| CONTACT_PERSON|etc...</strong></p> <pre><code> dell | Ighor |etc.. NULL | Dima |etc.. SELECT `contact`.*, `branch_has_equipment`.*, `branch_has_contact`.*, `equipment`.*, `customer_has_branch`.*, `branch`.*, `customer`.*, `ip`.* FROM `customer` INNER JOIN `customer_has_branch` ON `customer`.`customer_id` = `customer_has_branch`.`customer_id` INNER JOIN `branch` ON `customer_has_branch`.`branch_id` = `branch`.`branch_id` INNER JOIN `branch_has_equipment` ON `branch`.`branch_id` = `branch_has_equipment`.`branch_id` INNER JOIN `equipment` ON `branch_has_equipment`.`equipment_id` = `equipment`.`equipment_id` INNER JOIN `branch_has_contact` ON `branch`.`branch_id` = `branch_has_contact`.`branch_id` INNER JOIN `contact` ON `branch_has_contact`.`contact_id` = `contact`.`contact_id` INNER JOIN `equipment_has_ip` ON `equipment`.`equipment_id` = `equipment_has_ip`.`equipment_id` INNER JOIN `ip` ON `equipment_has_ip`.`equipment_id` = `ip`.`ip_id` WHERE `customer`.`inservice` = 'Yes' ORDER BY `customer`.`customer_name` </code></pre> <p>in additional, tables ^</p> <p>Customer</p> <p>customer_id customer_name inservice service_type comment</p> <p>Branch</p> <p>branch_id city address</p> <p>Equipment</p> <p>equipment_id brand model connection_param connection_type serial_number id release</p> <p>Contact</p> <p>contact_id name surname phone_mobile phone_work phone_other position</p> <p>customer_has_branch_id customer_id branch_id</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload