Skip to content

Instantly share code, notes, and snippets.

<!-- <?php debug($response); ?> -->
<table width='100%'>
<tr>
<td width='33%'>
<table>
<tr>
<th align='left'>Start Date:</th>
<?php if ($data['start_date'] !== ''): ?>
<td><?php echo date('n/j/Y', strtotime($data['start_date'])); ?></td>
<?php else: ?>
@Vader699
Vader699 / app.js
Created October 3, 2018 06:46
react-apollo add listener for socket reconnected example
import React, { Component } from 'react'
import { Query, withApollo } from 'react-apollo'
import gql from 'graphql-tag'
import {wsClient} from '../index'
const SOME_QUERY = gql`
query{
user {
id
name
$this->User->virtualFields['thename'] = "SELECT CONCAT(last_name,', ',first_name) FROM users WHERE id = User.id";
$options = array();
$options['conditions'] = array('not_employed' => false, 'id !=' => 79);
$options['fields'] = array('id', 'thename');
$options['order'] = 'thename ASC';
$options['recursive'] = -1;
$officerList = $this->User->find('list', $options);
import * as Mysql from 'meteor-mysql';
let connectionSettings = {
host : 'localhost',
user : 'sheriff',
password : 'sheriffsc',
database : 'sheriff'
};
export let sheriffDb = Mysql.connect(connectionSettings);