Upgrade to Pro — share decks privately, control downloads, hide ads and more …

PHPとmBaaSの美味しい関係

 PHPとmBaaSの美味しい関係

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

KOYAMA Tetsuji

May 21, 2016
Tweet

More Decks by KOYAMA Tetsuji

Other Decks in Technology

Transcript

  1. ࢖༻ྫσʔλετΞ΁ͷอଘ <?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()); }
  2. ࢖༻ྫσʔλετΞͷݕࡧ <?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()); }