This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT s.supplier_number, s.supplier_name, s.`country_of_company` , s.`region` , s.`country_of_company_name` , s.payment_term_key, s.po_spend, s.non_po_spend, s.total_po_spend, s.henkel_entity_name, s.supplier_master_basket_number, COUNT( DISTINCT s.payment_term_key ) AS total_terms, GROUP_CONCAT(s.payment_term_key) as terms FROM data_real s | |
GROUP BY s.supplier_name | |
HAVING total_terms > 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Bind a value on an array by path. | |
* | |
* @see Arr::path() | |
* @param array $array Array to update | |
* @param string $path Path | |
* @param mixed $value Value to set | |
* @param string $delimiter Path delimiter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Contact_Model extends Model | |
{ | |
public function read_contact($contact_id) | |
{ | |
if(is_numeric($contact_id)) | |
{ | |
$query = ORM::factory('contact', $contact_id)->find(); | |
} | |
else throw new Exception('Not a valid contact ID'); |