SlideShare uma empresa Scribd logo
1 de 23
2010/1/30 PHP Study Tokyo  #49 Yasushi Ichikawa (id:cakephper) ‏ (id:ichikaway) MongoDB + PHP + Cake
self-introduction Yasushi Ichikawa Twitter: @cakephper Twitter: @ichikaway  Blog English http://cake.eizoku.com/blog/ Japanese http://d.hatena.ne.jp/cakephper http://d.hatena.ne.jp/ichikaway
TOPIC 1. MongoDB 2. PHP + MongoDB 3. CakePHP + MongoDB
MongoDB ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
MongoDB ,[object Object],[object Object],[object Object]
MongoDB ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
MongoDB ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
MongoDB ,[object Object],[object Object],[object Object],[object Object],Posts collection Id, title, body Id, name, tel, fax Id, name, nickname, email
MongoDB ,[object Object],[object Object],Blog Title Text tag1,tag2,tag3 Comment1 Comment2 Comment3 PC Screen RDB Blog table Title Text Tags table Tag1 Tag2 Tag3 Comment Table Comment1 Comment2 Comment3
MongoDB ,[object Object],[object Object],Blog collection Title : xxxx Text : yyyy Tag: [tag1,tag2,tag3] Comment: [comment1, comment2, comment3 ] PC Screen Mongo Blog Title Text tag1,tag2,tag3 Comment1 Comment2 Comment3
MongoDB DEMO
Pecl Mongo MongoDB + PHP
Pecl Mongo ,[object Object],[object Object],[object Object],[object Object]
Pecl Mongo ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Pecl Mongo ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Pecl Mongo DEMO
Cake Mongo MongoDB + CakePHP
Cake Mongo ,[object Object],[object Object],[object Object],[object Object],[object Object],http://github.com/ichikaway/mongoDB-Datasource
Cake Mongo DEMO
Thank you!
show dbs use hogedb show collections ichikawa={name:'ichikawa', lang:['php','perl']} db.users.save(ichikawa) yasushi={name:'yasushi', lang:['japanese','english']} db.users.save(yasushi) db.users.count() db.users.find({name:"ichikawa"}) db.users.find({lang:"english"}) db.users.update({name:"ichikawa"}, {"$push":{lang:"javascript"}}) db.users.update({name:"ichikawa"}, {"$pop":{lang:""}}) db.posts.drop() db.dropDatabase()
<?php //MongoDB find sample $mongo = new Mongo('localhost:27017'); $db = $mongo->selectDB('phpstudy'); $collection = $db->selectCollection('posts'); $cond = array('tag' => 'tag9'); $field = array(); $result = $collection->find($cond, $field); $results = null; while ($result->hasNext()) { $mongodata = $result->getNext(); if (is_object($mongodata['_id'])) { $mongodata['_id'] = $mongodata['_id']->__toString(); } $results[][$model->alias] = $mongodata; } print_r($results); $mongo->close;
<?php //mongoDB insert sample $mongo = new Mongo('localhost:27017'); $db = $mongo->selectDB('phpstudy'); $collection = $db->selectCollection('posts'); $data = array( 'title' => 'hello', 'body' => 'world', 'tag' => array('tag1', 'tag2'), ); $collection->insert($data); $mongo->close;

Mais conteúdo relacionado

Mais procurados

Back to Basics Webinar 1: Introduction to NoSQL
Back to Basics Webinar 1: Introduction to NoSQLBack to Basics Webinar 1: Introduction to NoSQL
Back to Basics Webinar 1: Introduction to NoSQLMongoDB
 
Building Apps with MongoDB
Building Apps with MongoDBBuilding Apps with MongoDB
Building Apps with MongoDBNate Abele
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDBNosh Petigara
 
Webinar: Back to Basics: Thinking in Documents
Webinar: Back to Basics: Thinking in DocumentsWebinar: Back to Basics: Thinking in Documents
Webinar: Back to Basics: Thinking in DocumentsMongoDB
 
MongoDB for Beginners
MongoDB for BeginnersMongoDB for Beginners
MongoDB for BeginnersEnoch Joshua
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDBantoinegirbal
 
MongoDB : The Definitive Guide
MongoDB : The Definitive GuideMongoDB : The Definitive Guide
MongoDB : The Definitive GuideWildan Maulana
 
Webinaire 2 de la série « Retour aux fondamentaux » : Votre première applicat...
Webinaire 2 de la série « Retour aux fondamentaux » : Votre première applicat...Webinaire 2 de la série « Retour aux fondamentaux » : Votre première applicat...
Webinaire 2 de la série « Retour aux fondamentaux » : Votre première applicat...MongoDB
 
Back to Basics Webinar 3: Schema Design Thinking in Documents
 Back to Basics Webinar 3: Schema Design Thinking in Documents Back to Basics Webinar 3: Schema Design Thinking in Documents
Back to Basics Webinar 3: Schema Design Thinking in DocumentsMongoDB
 
Back to Basics: My First MongoDB Application
Back to Basics: My First MongoDB ApplicationBack to Basics: My First MongoDB Application
Back to Basics: My First MongoDB ApplicationMongoDB
 
Intro To Mongo Db
Intro To Mongo DbIntro To Mongo Db
Intro To Mongo Dbchriskite
 
Basics of MongoDB
Basics of MongoDB Basics of MongoDB
Basics of MongoDB Habilelabs
 
Inside MongoDB: the Internals of an Open-Source Database
Inside MongoDB: the Internals of an Open-Source DatabaseInside MongoDB: the Internals of an Open-Source Database
Inside MongoDB: the Internals of an Open-Source DatabaseMike Dirolf
 
Mongo DB: Fundamentals & Basics/ An Overview of MongoDB/ Mongo DB tutorials
Mongo DB: Fundamentals & Basics/ An Overview of MongoDB/ Mongo DB tutorialsMongo DB: Fundamentals & Basics/ An Overview of MongoDB/ Mongo DB tutorials
Mongo DB: Fundamentals & Basics/ An Overview of MongoDB/ Mongo DB tutorialsSpringPeople
 
Building Your First MongoDB App
Building Your First MongoDB AppBuilding Your First MongoDB App
Building Your First MongoDB AppHenrik Ingo
 

Mais procurados (20)

Indexing
IndexingIndexing
Indexing
 
Back to Basics Webinar 1: Introduction to NoSQL
Back to Basics Webinar 1: Introduction to NoSQLBack to Basics Webinar 1: Introduction to NoSQL
Back to Basics Webinar 1: Introduction to NoSQL
 
Building Apps with MongoDB
Building Apps with MongoDBBuilding Apps with MongoDB
Building Apps with MongoDB
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
Webinar: Back to Basics: Thinking in Documents
Webinar: Back to Basics: Thinking in DocumentsWebinar: Back to Basics: Thinking in Documents
Webinar: Back to Basics: Thinking in Documents
 
MongoDB for Beginners
MongoDB for BeginnersMongoDB for Beginners
MongoDB for Beginners
 
Python and MongoDB
Python and MongoDBPython and MongoDB
Python and MongoDB
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
MongoDB : The Definitive Guide
MongoDB : The Definitive GuideMongoDB : The Definitive Guide
MongoDB : The Definitive Guide
 
Mongo db basics
Mongo db basicsMongo db basics
Mongo db basics
 
Webinaire 2 de la série « Retour aux fondamentaux » : Votre première applicat...
Webinaire 2 de la série « Retour aux fondamentaux » : Votre première applicat...Webinaire 2 de la série « Retour aux fondamentaux » : Votre première applicat...
Webinaire 2 de la série « Retour aux fondamentaux » : Votre première applicat...
 
Back to Basics Webinar 3: Schema Design Thinking in Documents
 Back to Basics Webinar 3: Schema Design Thinking in Documents Back to Basics Webinar 3: Schema Design Thinking in Documents
Back to Basics Webinar 3: Schema Design Thinking in Documents
 
Python and MongoDB
Python and MongoDB Python and MongoDB
Python and MongoDB
 
Back to Basics: My First MongoDB Application
Back to Basics: My First MongoDB ApplicationBack to Basics: My First MongoDB Application
Back to Basics: My First MongoDB Application
 
Intro To Mongo Db
Intro To Mongo DbIntro To Mongo Db
Intro To Mongo Db
 
Basics of MongoDB
Basics of MongoDB Basics of MongoDB
Basics of MongoDB
 
Mongo DB Presentation
Mongo DB PresentationMongo DB Presentation
Mongo DB Presentation
 
Inside MongoDB: the Internals of an Open-Source Database
Inside MongoDB: the Internals of an Open-Source DatabaseInside MongoDB: the Internals of an Open-Source Database
Inside MongoDB: the Internals of an Open-Source Database
 
Mongo DB: Fundamentals & Basics/ An Overview of MongoDB/ Mongo DB tutorials
Mongo DB: Fundamentals & Basics/ An Overview of MongoDB/ Mongo DB tutorialsMongo DB: Fundamentals & Basics/ An Overview of MongoDB/ Mongo DB tutorials
Mongo DB: Fundamentals & Basics/ An Overview of MongoDB/ Mongo DB tutorials
 
Building Your First MongoDB App
Building Your First MongoDB AppBuilding Your First MongoDB App
Building Your First MongoDB App
 

Destaque

CakePHP2 Loading (Japanese)
CakePHP2 Loading (Japanese)CakePHP2 Loading (Japanese)
CakePHP2 Loading (Japanese)ichikaway
 
Cakephp勉強会@福岡 発表資料
Cakephp勉強会@福岡 発表資料Cakephp勉強会@福岡 発表資料
Cakephp勉強会@福岡 発表資料ichikaway
 
福岡xTwilio twilio meetup
福岡xTwilio  twilio meetup福岡xTwilio  twilio meetup
福岡xTwilio twilio meetupichikaway
 
Phpcon kansai 2011 ichikaway
Phpcon kansai 2011 ichikawayPhpcon kansai 2011 ichikaway
Phpcon kansai 2011 ichikawayichikaway
 
VAddy at LL Diver LT
VAddy at LL Diver LTVAddy at LL Diver LT
VAddy at LL Diver LTichikaway
 
FutureSync 世界の開発者とコラボしよう
FutureSync 世界の開発者とコラボしようFutureSync 世界の開発者とコラボしよう
FutureSync 世界の開発者とコラボしようichikaway
 
Experience of (Ichikaway iteigo1)
Experience of (Ichikaway iteigo1)Experience of (Ichikaway iteigo1)
Experience of (Ichikaway iteigo1)ichikaway
 
Tips of CakePHP and MongoDB - Cakefest2011 ichikaway
Tips of CakePHP and MongoDB - Cakefest2011 ichikaway Tips of CakePHP and MongoDB - Cakefest2011 ichikaway
Tips of CakePHP and MongoDB - Cakefest2011 ichikaway ichikaway
 

Destaque (8)

CakePHP2 Loading (Japanese)
CakePHP2 Loading (Japanese)CakePHP2 Loading (Japanese)
CakePHP2 Loading (Japanese)
 
Cakephp勉強会@福岡 発表資料
Cakephp勉強会@福岡 発表資料Cakephp勉強会@福岡 発表資料
Cakephp勉強会@福岡 発表資料
 
福岡xTwilio twilio meetup
福岡xTwilio  twilio meetup福岡xTwilio  twilio meetup
福岡xTwilio twilio meetup
 
Phpcon kansai 2011 ichikaway
Phpcon kansai 2011 ichikawayPhpcon kansai 2011 ichikaway
Phpcon kansai 2011 ichikaway
 
VAddy at LL Diver LT
VAddy at LL Diver LTVAddy at LL Diver LT
VAddy at LL Diver LT
 
FutureSync 世界の開発者とコラボしよう
FutureSync 世界の開発者とコラボしようFutureSync 世界の開発者とコラボしよう
FutureSync 世界の開発者とコラボしよう
 
Experience of (Ichikaway iteigo1)
Experience of (Ichikaway iteigo1)Experience of (Ichikaway iteigo1)
Experience of (Ichikaway iteigo1)
 
Tips of CakePHP and MongoDB - Cakefest2011 ichikaway
Tips of CakePHP and MongoDB - Cakefest2011 ichikaway Tips of CakePHP and MongoDB - Cakefest2011 ichikaway
Tips of CakePHP and MongoDB - Cakefest2011 ichikaway
 

Semelhante a PHP MongoDB CakePHP Introduction

Rapid and Scalable Development with MongoDB, PyMongo, and Ming
Rapid and Scalable Development with MongoDB, PyMongo, and MingRapid and Scalable Development with MongoDB, PyMongo, and Ming
Rapid and Scalable Development with MongoDB, PyMongo, and MingRick Copeland
 
Introduction To Moco
Introduction To MocoIntroduction To Moco
Introduction To MocoNaoya Ito
 
Introduction to MongoDB with PHP
Introduction to MongoDB with PHPIntroduction to MongoDB with PHP
Introduction to MongoDB with PHPfwso
 
Getting started with MongoDB and PHP
Getting started with MongoDB and PHPGetting started with MongoDB and PHP
Getting started with MongoDB and PHPgates10gen
 
This upload requires better support for ODP format
This upload requires better support for ODP formatThis upload requires better support for ODP format
This upload requires better support for ODP formatForest Mars
 
How to use MongoDB with CakePHP
How to use MongoDB with CakePHPHow to use MongoDB with CakePHP
How to use MongoDB with CakePHPichikaway
 
Abstracting functionality with centralised content
Abstracting functionality with centralised contentAbstracting functionality with centralised content
Abstracting functionality with centralised contentMichael Peacock
 
DrupalCon Chicago Practical MongoDB and Drupal
DrupalCon Chicago Practical MongoDB and DrupalDrupalCon Chicago Practical MongoDB and Drupal
DrupalCon Chicago Practical MongoDB and DrupalDoug Green
 
Using MongoDB With Groovy
Using MongoDB With GroovyUsing MongoDB With Groovy
Using MongoDB With GroovyJames Williams
 
Java Development with MongoDB (James Williams)
Java Development with MongoDB (James Williams)Java Development with MongoDB (James Williams)
Java Development with MongoDB (James Williams)MongoSF
 
The FPDF Library
The FPDF LibraryThe FPDF Library
The FPDF LibraryDave Ross
 
ZendCon2010 Doctrine MongoDB ODM
ZendCon2010 Doctrine MongoDB ODMZendCon2010 Doctrine MongoDB ODM
ZendCon2010 Doctrine MongoDB ODMJonathan Wage
 
MongoDB Thinkorswim
MongoDB ThinkorswimMongoDB Thinkorswim
MongoDB ThinkorswimSethEdwards
 
Pyramid Lighter/Faster/Better web apps
Pyramid Lighter/Faster/Better web appsPyramid Lighter/Faster/Better web apps
Pyramid Lighter/Faster/Better web appsDylan Jay
 
Java Persistence Frameworks for MongoDB
Java Persistence Frameworks for MongoDBJava Persistence Frameworks for MongoDB
Java Persistence Frameworks for MongoDBMongoDB
 

Semelhante a PHP MongoDB CakePHP Introduction (20)

Rapid and Scalable Development with MongoDB, PyMongo, and Ming
Rapid and Scalable Development with MongoDB, PyMongo, and MingRapid and Scalable Development with MongoDB, PyMongo, and Ming
Rapid and Scalable Development with MongoDB, PyMongo, and Ming
 
Introduction To Moco
Introduction To MocoIntroduction To Moco
Introduction To Moco
 
Introduction to MongoDB with PHP
Introduction to MongoDB with PHPIntroduction to MongoDB with PHP
Introduction to MongoDB with PHP
 
Getting started with MongoDB and PHP
Getting started with MongoDB and PHPGetting started with MongoDB and PHP
Getting started with MongoDB and PHP
 
This upload requires better support for ODP format
This upload requires better support for ODP formatThis upload requires better support for ODP format
This upload requires better support for ODP format
 
How to use MongoDB with CakePHP
How to use MongoDB with CakePHPHow to use MongoDB with CakePHP
How to use MongoDB with CakePHP
 
Abstracting functionality with centralised content
Abstracting functionality with centralised contentAbstracting functionality with centralised content
Abstracting functionality with centralised content
 
Mongo-Drupal
Mongo-DrupalMongo-Drupal
Mongo-Drupal
 
DrupalCon Chicago Practical MongoDB and Drupal
DrupalCon Chicago Practical MongoDB and DrupalDrupalCon Chicago Practical MongoDB and Drupal
DrupalCon Chicago Practical MongoDB and Drupal
 
Using MongoDB With Groovy
Using MongoDB With GroovyUsing MongoDB With Groovy
Using MongoDB With Groovy
 
Java Development with MongoDB (James Williams)
Java Development with MongoDB (James Williams)Java Development with MongoDB (James Williams)
Java Development with MongoDB (James Williams)
 
The FPDF Library
The FPDF LibraryThe FPDF Library
The FPDF Library
 
PHP 5 Sucks. PHP 5 Rocks.
PHP 5 Sucks. PHP 5 Rocks.PHP 5 Sucks. PHP 5 Rocks.
PHP 5 Sucks. PHP 5 Rocks.
 
What's New in ZF 1.10
What's New in ZF 1.10What's New in ZF 1.10
What's New in ZF 1.10
 
ZendCon2010 Doctrine MongoDB ODM
ZendCon2010 Doctrine MongoDB ODMZendCon2010 Doctrine MongoDB ODM
ZendCon2010 Doctrine MongoDB ODM
 
MongoDB Thinkorswim
MongoDB ThinkorswimMongoDB Thinkorswim
MongoDB Thinkorswim
 
The emerging world of mongo db csp
The emerging world of mongo db   cspThe emerging world of mongo db   csp
The emerging world of mongo db csp
 
Pyramid Lighter/Faster/Better web apps
Pyramid Lighter/Faster/Better web appsPyramid Lighter/Faster/Better web apps
Pyramid Lighter/Faster/Better web apps
 
Java Persistence Frameworks for MongoDB
Java Persistence Frameworks for MongoDBJava Persistence Frameworks for MongoDB
Java Persistence Frameworks for MongoDB
 
MongoDB and Node.js
MongoDB and Node.jsMongoDB and Node.js
MongoDB and Node.js
 

Mais de ichikaway

forteeに脆弱性検査をかけてみた VAddy編
forteeに脆弱性検査をかけてみた VAddy編forteeに脆弱性検査をかけてみた VAddy編
forteeに脆弱性検査をかけてみた VAddy編ichikaway
 
Understanding Computer Architecture with NES Emulator
Understanding Computer Architecture with NES EmulatorUnderstanding Computer Architecture with NES Emulator
Understanding Computer Architecture with NES Emulatorichikaway
 
VAddyの課金システムを Stripeに乗り換えた話
VAddyの課金システムを Stripeに乗り換えた話VAddyの課金システムを Stripeに乗り換えた話
VAddyの課金システムを Stripeに乗り換えた話ichikaway
 
Hello, Worldまで3ヶ月 Golangでファミコンエミュレータ実装 #gocon fukuoka 2019
Hello, Worldまで3ヶ月 Golangでファミコンエミュレータ実装 #gocon fukuoka 2019Hello, Worldまで3ヶ月 Golangでファミコンエミュレータ実装 #gocon fukuoka 2019
Hello, Worldまで3ヶ月 Golangでファミコンエミュレータ実装 #gocon fukuoka 2019ichikaway
 
ゼロから始めるファミコンエミュレータ生活 PHPerKaigi2019
ゼロから始めるファミコンエミュレータ生活 PHPerKaigi2019ゼロから始めるファミコンエミュレータ生活 PHPerKaigi2019
ゼロから始めるファミコンエミュレータ生活 PHPerKaigi2019ichikaway
 
現場で使える脆弱性検査サービス VAddy
現場で使える脆弱性検査サービス VAddy 現場で使える脆弱性検査サービス VAddy
現場で使える脆弱性検査サービス VAddy ichikaway
 
OS入門 Fukuoka.php vol.18 LT資料
OS入門 Fukuoka.php vol.18 LT資料OS入門 Fukuoka.php vol.18 LT資料
OS入門 Fukuoka.php vol.18 LT資料ichikaway
 
Yapc8oji: セキュリティテストサービスを開発運営してきた2年
Yapc8oji: セキュリティテストサービスを開発運営してきた2年Yapc8oji: セキュリティテストサービスを開発運営してきた2年
Yapc8oji: セキュリティテストサービスを開発運営してきた2年ichikaway
 
VAaddyとは VAddyミートアップvol3_20160629
VAaddyとは  VAddyミートアップvol3_20160629VAaddyとは  VAddyミートアップvol3_20160629
VAaddyとは VAddyミートアップvol3_20160629ichikaway
 
脆弱性もバグ、だからテストしよう PHPカンファンレス2015
脆弱性もバグ、だからテストしよう PHPカンファンレス2015脆弱性もバグ、だからテストしよう PHPカンファンレス2015
脆弱性もバグ、だからテストしよう PHPカンファンレス2015ichikaway
 
脆弱性もバグ、だからテストしよう DevSummiFukuoka
脆弱性もバグ、だからテストしよう DevSummiFukuoka脆弱性もバグ、だからテストしよう DevSummiFukuoka
脆弱性もバグ、だからテストしよう DevSummiFukuokaichikaway
 
Vulnerabilities are bugs, Let's test for them!
Vulnerabilities are bugs, Let's test for them!Vulnerabilities are bugs, Let's test for them!
Vulnerabilities are bugs, Let's test for them!ichikaway
 
脆弱性もバグ、だからテストしよう!
脆弱性もバグ、だからテストしよう!脆弱性もバグ、だからテストしよう!
脆弱性もバグ、だからテストしよう!ichikaway
 
継続的Webセキュリティテスト PHPカンファレンス関西2015 LT
継続的Webセキュリティテスト PHPカンファレンス関西2015 LT継続的Webセキュリティテスト PHPカンファレンス関西2015 LT
継続的Webセキュリティテスト PHPカンファレンス関西2015 LTichikaway
 
継続的Webセキュリティテスト testing casual talks2
継続的Webセキュリティテスト testing casual talks2継続的Webセキュリティテスト testing casual talks2
継続的Webセキュリティテスト testing casual talks2ichikaway
 
Ctf2015 ichikawa Eizoku PM2.5 dial
Ctf2015 ichikawa Eizoku PM2.5 dialCtf2015 ichikawa Eizoku PM2.5 dial
Ctf2015 ichikawa Eizoku PM2.5 dialichikaway
 
VAddy - CI勉強会 fukuoka
VAddy - CI勉強会 fukuokaVAddy - CI勉強会 fukuoka
VAddy - CI勉強会 fukuokaichikaway
 
Jenkinsを使った継続的セキュリティテスト
Jenkinsを使った継続的セキュリティテストJenkinsを使った継続的セキュリティテスト
Jenkinsを使った継続的セキュリティテストichikaway
 
継続的セキュリティテストVaddy説明資料
継続的セキュリティテストVaddy説明資料継続的セキュリティテストVaddy説明資料
継続的セキュリティテストVaddy説明資料ichikaway
 
phpcon kansai 20140628
phpcon kansai 20140628phpcon kansai 20140628
phpcon kansai 20140628ichikaway
 

Mais de ichikaway (20)

forteeに脆弱性検査をかけてみた VAddy編
forteeに脆弱性検査をかけてみた VAddy編forteeに脆弱性検査をかけてみた VAddy編
forteeに脆弱性検査をかけてみた VAddy編
 
Understanding Computer Architecture with NES Emulator
Understanding Computer Architecture with NES EmulatorUnderstanding Computer Architecture with NES Emulator
Understanding Computer Architecture with NES Emulator
 
VAddyの課金システムを Stripeに乗り換えた話
VAddyの課金システムを Stripeに乗り換えた話VAddyの課金システムを Stripeに乗り換えた話
VAddyの課金システムを Stripeに乗り換えた話
 
Hello, Worldまで3ヶ月 Golangでファミコンエミュレータ実装 #gocon fukuoka 2019
Hello, Worldまで3ヶ月 Golangでファミコンエミュレータ実装 #gocon fukuoka 2019Hello, Worldまで3ヶ月 Golangでファミコンエミュレータ実装 #gocon fukuoka 2019
Hello, Worldまで3ヶ月 Golangでファミコンエミュレータ実装 #gocon fukuoka 2019
 
ゼロから始めるファミコンエミュレータ生活 PHPerKaigi2019
ゼロから始めるファミコンエミュレータ生活 PHPerKaigi2019ゼロから始めるファミコンエミュレータ生活 PHPerKaigi2019
ゼロから始めるファミコンエミュレータ生活 PHPerKaigi2019
 
現場で使える脆弱性検査サービス VAddy
現場で使える脆弱性検査サービス VAddy 現場で使える脆弱性検査サービス VAddy
現場で使える脆弱性検査サービス VAddy
 
OS入門 Fukuoka.php vol.18 LT資料
OS入門 Fukuoka.php vol.18 LT資料OS入門 Fukuoka.php vol.18 LT資料
OS入門 Fukuoka.php vol.18 LT資料
 
Yapc8oji: セキュリティテストサービスを開発運営してきた2年
Yapc8oji: セキュリティテストサービスを開発運営してきた2年Yapc8oji: セキュリティテストサービスを開発運営してきた2年
Yapc8oji: セキュリティテストサービスを開発運営してきた2年
 
VAaddyとは VAddyミートアップvol3_20160629
VAaddyとは  VAddyミートアップvol3_20160629VAaddyとは  VAddyミートアップvol3_20160629
VAaddyとは VAddyミートアップvol3_20160629
 
脆弱性もバグ、だからテストしよう PHPカンファンレス2015
脆弱性もバグ、だからテストしよう PHPカンファンレス2015脆弱性もバグ、だからテストしよう PHPカンファンレス2015
脆弱性もバグ、だからテストしよう PHPカンファンレス2015
 
脆弱性もバグ、だからテストしよう DevSummiFukuoka
脆弱性もバグ、だからテストしよう DevSummiFukuoka脆弱性もバグ、だからテストしよう DevSummiFukuoka
脆弱性もバグ、だからテストしよう DevSummiFukuoka
 
Vulnerabilities are bugs, Let's test for them!
Vulnerabilities are bugs, Let's test for them!Vulnerabilities are bugs, Let's test for them!
Vulnerabilities are bugs, Let's test for them!
 
脆弱性もバグ、だからテストしよう!
脆弱性もバグ、だからテストしよう!脆弱性もバグ、だからテストしよう!
脆弱性もバグ、だからテストしよう!
 
継続的Webセキュリティテスト PHPカンファレンス関西2015 LT
継続的Webセキュリティテスト PHPカンファレンス関西2015 LT継続的Webセキュリティテスト PHPカンファレンス関西2015 LT
継続的Webセキュリティテスト PHPカンファレンス関西2015 LT
 
継続的Webセキュリティテスト testing casual talks2
継続的Webセキュリティテスト testing casual talks2継続的Webセキュリティテスト testing casual talks2
継続的Webセキュリティテスト testing casual talks2
 
Ctf2015 ichikawa Eizoku PM2.5 dial
Ctf2015 ichikawa Eizoku PM2.5 dialCtf2015 ichikawa Eizoku PM2.5 dial
Ctf2015 ichikawa Eizoku PM2.5 dial
 
VAddy - CI勉強会 fukuoka
VAddy - CI勉強会 fukuokaVAddy - CI勉強会 fukuoka
VAddy - CI勉強会 fukuoka
 
Jenkinsを使った継続的セキュリティテスト
Jenkinsを使った継続的セキュリティテストJenkinsを使った継続的セキュリティテスト
Jenkinsを使った継続的セキュリティテスト
 
継続的セキュリティテストVaddy説明資料
継続的セキュリティテストVaddy説明資料継続的セキュリティテストVaddy説明資料
継続的セキュリティテストVaddy説明資料
 
phpcon kansai 20140628
phpcon kansai 20140628phpcon kansai 20140628
phpcon kansai 20140628
 

Último

Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 

Último (20)

Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 

PHP MongoDB CakePHP Introduction

  • 1. 2010/1/30 PHP Study Tokyo #49 Yasushi Ichikawa (id:cakephper) ‏ (id:ichikaway) MongoDB + PHP + Cake
  • 2. self-introduction Yasushi Ichikawa Twitter: @cakephper Twitter: @ichikaway Blog English http://cake.eizoku.com/blog/ Japanese http://d.hatena.ne.jp/cakephper http://d.hatena.ne.jp/ichikaway
  • 3. TOPIC 1. MongoDB 2. PHP + MongoDB 3. CakePHP + MongoDB
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 13.
  • 14.
  • 15.
  • 17. Cake Mongo MongoDB + CakePHP
  • 18.
  • 21. show dbs use hogedb show collections ichikawa={name:'ichikawa', lang:['php','perl']} db.users.save(ichikawa) yasushi={name:'yasushi', lang:['japanese','english']} db.users.save(yasushi) db.users.count() db.users.find({name:&quot;ichikawa&quot;}) db.users.find({lang:&quot;english&quot;}) db.users.update({name:&quot;ichikawa&quot;}, {&quot;$push&quot;:{lang:&quot;javascript&quot;}}) db.users.update({name:&quot;ichikawa&quot;}, {&quot;$pop&quot;:{lang:&quot;&quot;}}) db.posts.drop() db.dropDatabase()
  • 22. <?php //MongoDB find sample $mongo = new Mongo('localhost:27017'); $db = $mongo->selectDB('phpstudy'); $collection = $db->selectCollection('posts'); $cond = array('tag' => 'tag9'); $field = array(); $result = $collection->find($cond, $field); $results = null; while ($result->hasNext()) { $mongodata = $result->getNext(); if (is_object($mongodata['_id'])) { $mongodata['_id'] = $mongodata['_id']->__toString(); } $results[][$model->alias] = $mongodata; } print_r($results); $mongo->close;
  • 23. <?php //mongoDB insert sample $mongo = new Mongo('localhost:27017'); $db = $mongo->selectDB('phpstudy'); $collection = $db->selectCollection('posts'); $data = array( 'title' => 'hello', 'body' => 'world', 'tag' => array('tag1', 'tag2'), ); $collection->insert($data); $mongo->close;