PHPとmBaaSの美味しい関係

 PHPとmBaaSの美味しい関係

2016年5月21日のPHPカンファレンス福岡2016で発表した資料です。

83f9862ef4599c97e99d020eb8e20d87?s=128

KOYAMA Tetsuji

May 21, 2016
Tweet

Transcript

  1. 8.
  2. 26.

    ࢖༻ྫσʔλετΞ΁ͷอଘ <?php use Ncmb\NCMB; use Ncmb\Object; try { $appkey =

    'xxxxxxxx'; $clientkey = 'yyyyyyyy'; NCMB::initialize($appkey, $clientkey); $className = 'myClass'; $object = new Object($className); $object->key1 = 'a'; $object->key2 = 'b'; $object->save(); } catch (Exception $e) { die($e->getMessage()); }
  3. 27.

    ࢖༻ྫσʔλετΞͷݕࡧ <?php use Ncmb\NCMB; use Ncmb\Query; try { $appkey =

    'xxxxxxxx'; $clientkey = 'yyyyyyyy'; NCMB::initialize($appkey, $clientkey); $className = 'myClass'; $query = new Query($className); $query->equalTo('key1', 'a'); $results = $query->find(); var_dump(count($results)); // 1 } catch (Exception $e) { die($e->getMessage()); }