Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- customerID
- key1
- value1
- SELECT `customer`.*, `ca1`.`value1` AS `wedding_date`, `ca2`.`value1` AS `test`
- FROM `customer`
- LEFT JOIN `customer_attributes` AS `ca1` ON customer.customerID = ca1.customerID
- LEFT JOIN `customer_attributes` AS `ca2` ON customer.customerID = ca2.customerID
- WHERE (customer.customerID = '58029')
- AND (ca1.key1 = 'wedding_date')
- AND (ca2.key1 = 'test')
- SELECT `customer`.*, `ca1`.`value1` AS `wedding_date`, `ca2`.`value1` AS `test`
- FROM `customer`
- LEFT JOIN `customer_attributes` AS `ca1` ON customer.customerID = ca1.customerID AND ca1.key1='wedding_date'
- LEFT JOIN `customer_attributes` AS `ca2` ON customer.customerID = ca2.customerID AND ca2.key1='test'
- WHERE (customer.customerID = '58029')
- SELECT `customer`.*, `ca1`.`value1` AS `wedding_date`, `ca2`.`value1` AS `test`
- FROM `customer`
- LEFT JOIN `customer_attributes` AS `ca1` ON customer.customerID = ca1.customerID AND ca1.key1 = 'wedding_date'
- LEFT JOIN `customer_attributes` AS `ca2` ON customer.customerID = ca2.customerID AND ca2.key1 = 'test'
- WHERE (customer.customerID = '58029')
- SELECT `customer`.*, `ca1`.`value1` AS `wedding_date`, `ca2`.`value1` AS `test`
- FROM `customer`
- LEFT JOIN `customer_attributes` AS `ca1` ON customer.customerID = ca1.customerID
- AND (ca1.key1 = 'wedding_date')
- LEFT JOIN `customer_attributes` AS `ca2` ON customer.customerID = ca2.customerID
- AND (ca2.key1 = 'test')
- WHERE (customer.customerID = '58029')
Add Comment
Please, Sign In to add comment