Skip to content

Instantly share code, notes, and snippets.

SELECT del.* FROM del AS a
JOIN accts ON a.acctno = accts.acctno AND accts.status IN ('1', '2')
JOIN trans ON a.acctno = trans.acctno AND trans.code NOT IN ('1', '2')
AND ( SELECT MAX(trans.dte) FROM trans AS b WHERE b.acctno = a.acctno ORDER BY b.dte DESC ) < {date}
WHERE a.days > 90
// Model User.php
public function groups()
{
return $this->belongsToMany('SARP\UserGroup','users_groups', 'user_id', 'group_id');
}
// Model UserGroup.php
public function users()
{
@SeoRoman
SeoRoman / array.php
Created January 7, 2014 20:03 — forked from matula/array.php
<?php
$social_data = [
[
'first' => 'John',
'middle' => 'Smith',
'last' => 'Doe',
'email' => 'abc@example.com'
],
[