Skip to content

Instantly share code, notes, and snippets.

View isaiahdw's full-sized avatar

Isaiah DeRose-Wilson isaiahdw

  • SmartRent
  • Scottsdale, AZ
View GitHub Profile
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
@isaiahdw
isaiahdw / arr.php
Created May 10, 2011 00:11
session.php
<?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
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');