SlideShare a Scribd company logo
1 of 72
Download to read offline
CakePHP2


 CakePHP Yusuke Ando (@yando)
          Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
by crabchick




CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
<?php
$keyword = '';
if (isset($_POST['keyword'])) {
       $keyword = $_POST['keyword'];
}


mysql_connect('localhost','user','password');
mysql_select_db('cakephp_sample');
mysql_query('set names utf8');
$sql = sprintf(
     "SELECT id,name,description FROM friends WHERE name LIKE '%s'",
     mysql_real_escape_string('%'.$keyword.'%')
);
$result = mysql_query($sql);
$data = array();
while ($row = mysql_fetch_assoc($result)) {
     $data[] = $row;
}
?>
<html>
<head><title>               </title></head>
<body>
<form action="list1.php" method="POST">
<input name="keyword"><input type="submit">
</form>
<ul>
<?php
foreach ($data as $row) {
       echo '<li>';
       echo $row['name'];
       echo $row['description'];
       echo '</li>';
}
?></ul>
</body></html>




         CakePHP                   Yusuke Ando (@yando)
<?php
$keyword = '';
if (isset($_POST['keyword'])) {
       $keyword = $_POST['keyword'];
}


mysql_connect('localhost','user','password');
mysql_select_db('cakephp_sample');
mysql_query('set names utf8');
$sql = sprintf(
     "SELECT id,name,description FROM friends WHERE name LIKE '%s'",
     mysql_real_escape_string('%'.$keyword.'%')
);
$result = mysql_query($sql);
$data = array();
while ($row = mysql_fetch_assoc($result)) {
     $data[] = $row;
}
?>
<html>
<head><title>               </title></head>
<body>
<form action="list1.php" method="POST">
<input name="keyword"><input type="submit">
</form>
<ul>
<?php
foreach ($data as $row) {
       echo '<li>';
       echo $row['name'];
       echo $row['description'];
       echo '</li>';
}
?></ul>
</body></html>




         CakePHP                   Yusuke Ando (@yando)
<?php
                                               //model.php
                                               mysql_connect('localhost','user','password');
                                               mysql_select_db('cakephp_sample');
                                               mysql_query('set names utf8');
                                               $sql = sprintf(
                                                    "SELECT id,name,description FROM friends WHERE name LIKE '%s'",
                                                    mysql_real_escape_string('%'.$keyword.'%')
                                               );
                                               $result = mysql_query($sql);
                                               $data = array();
                                               while ($row = mysql_fetch_assoc($result)) {
<?php
                                                    $data[] = $row;
//index.php
                                               }
$keyword = '';
if (isset($_POST['keyword'])) {
    $keyword = $_POST['keyword'];
}

                                               <!-- view.php -->
include ‘model.php’;                           <html>
include ‘view.php’;                            <head><title>               </title></head>
                                               <body>
                                               <form action="list1.php" method="POST">
                                               <input name="keyword"><input type="submit">
                                               </form>
                                               <ul>
                                               <?php
                                               foreach ($data as $row) {
                                                      echo '<li>';
                                                      echo $row['name'];
                                                      echo $row['description'];
                                                      echo '</li>';
                                               }
                                               ?></ul>
                                               </body></html>




                                    CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
/**
  * To configure CakePHP *not* to use mod_rewrite and to
  * use CakePHP pretty URLs, remove these .htaccess
  * files:
  *
  * /.htaccess
  * /app/.htaccess
  * /app/webroot/.htaccess
  *
  * And uncomment the App.baseUrl below:
  */
	     //Configure::write('App.baseUrl', env('SCRIPT_NAME'));




                CakePHP       Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)
CakePHP   Yusuke Ando (@yando)

More Related Content

What's hot

News of the Symfony2 World
News of the Symfony2 WorldNews of the Symfony2 World
News of the Symfony2 WorldFabien Potencier
 
[PL] Jak nie zostać "programistą" PHP?
[PL] Jak nie zostać "programistą" PHP?[PL] Jak nie zostać "programistą" PHP?
[PL] Jak nie zostać "programistą" PHP?Radek Benkel
 
PHPUnit でよりよくテストを書くために
PHPUnit でよりよくテストを書くためにPHPUnit でよりよくテストを書くために
PHPUnit でよりよくテストを書くためにYuya Takeyama
 
The Perl6 Type System
The Perl6 Type SystemThe Perl6 Type System
The Perl6 Type Systemabrummett
 
The state of Symfony2 - SymfonyDay 2010
The state of Symfony2 - SymfonyDay 2010The state of Symfony2 - SymfonyDay 2010
The state of Symfony2 - SymfonyDay 2010Fabien Potencier
 
Extbase and Beyond
Extbase and BeyondExtbase and Beyond
Extbase and BeyondJochen Rau
 
Php unit the-mostunknownparts
Php unit the-mostunknownpartsPhp unit the-mostunknownparts
Php unit the-mostunknownpartsBastian Feder
 
Get into the FLOW with Extbase
Get into the FLOW with ExtbaseGet into the FLOW with Extbase
Get into the FLOW with ExtbaseJochen Rau
 
international PHP2011_Bastian Feder_jQuery's Secrets
international PHP2011_Bastian Feder_jQuery's Secretsinternational PHP2011_Bastian Feder_jQuery's Secrets
international PHP2011_Bastian Feder_jQuery's Secretssmueller_sandsmedia
 
Learning Perl 6 (NPW 2007)
Learning Perl 6 (NPW 2007)Learning Perl 6 (NPW 2007)
Learning Perl 6 (NPW 2007)brian d foy
 
Learning Perl 6
Learning Perl 6 Learning Perl 6
Learning Perl 6 brian d foy
 
20160227 Granma
20160227 Granma20160227 Granma
20160227 GranmaSharon Liu
 
Advanced modulinos trial
Advanced modulinos trialAdvanced modulinos trial
Advanced modulinos trialbrian d foy
 

What's hot (20)

News of the Symfony2 World
News of the Symfony2 WorldNews of the Symfony2 World
News of the Symfony2 World
 
[PL] Jak nie zostać "programistą" PHP?
[PL] Jak nie zostać "programistą" PHP?[PL] Jak nie zostać "programistą" PHP?
[PL] Jak nie zostać "programistą" PHP?
 
PHPUnit でよりよくテストを書くために
PHPUnit でよりよくテストを書くためにPHPUnit でよりよくテストを書くために
PHPUnit でよりよくテストを書くために
 
The Perl6 Type System
The Perl6 Type SystemThe Perl6 Type System
The Perl6 Type System
 
Perl6 grammars
Perl6 grammarsPerl6 grammars
Perl6 grammars
 
The state of Symfony2 - SymfonyDay 2010
The state of Symfony2 - SymfonyDay 2010The state of Symfony2 - SymfonyDay 2010
The state of Symfony2 - SymfonyDay 2010
 
Php
PhpPhp
Php
 
Current state-of-php
Current state-of-phpCurrent state-of-php
Current state-of-php
 
Extbase and Beyond
Extbase and BeyondExtbase and Beyond
Extbase and Beyond
 
Php unit the-mostunknownparts
Php unit the-mostunknownpartsPhp unit the-mostunknownparts
Php unit the-mostunknownparts
 
PHP Tips & Tricks
PHP Tips & TricksPHP Tips & Tricks
PHP Tips & Tricks
 
Get into the FLOW with Extbase
Get into the FLOW with ExtbaseGet into the FLOW with Extbase
Get into the FLOW with Extbase
 
The most exciting features of PHP 7.1
The most exciting features of PHP 7.1The most exciting features of PHP 7.1
The most exciting features of PHP 7.1
 
international PHP2011_Bastian Feder_jQuery's Secrets
international PHP2011_Bastian Feder_jQuery's Secretsinternational PHP2011_Bastian Feder_jQuery's Secrets
international PHP2011_Bastian Feder_jQuery's Secrets
 
Learning Perl 6 (NPW 2007)
Learning Perl 6 (NPW 2007)Learning Perl 6 (NPW 2007)
Learning Perl 6 (NPW 2007)
 
Php array
Php arrayPhp array
Php array
 
Learning Perl 6
Learning Perl 6 Learning Perl 6
Learning Perl 6
 
Arrays in PHP
Arrays in PHPArrays in PHP
Arrays in PHP
 
20160227 Granma
20160227 Granma20160227 Granma
20160227 Granma
 
Advanced modulinos trial
Advanced modulinos trialAdvanced modulinos trial
Advanced modulinos trial
 

Similar to 8時間耐久CakePHP2 勉強会

C A S Sample Php
C A S Sample PhpC A S Sample Php
C A S Sample PhpJH Lee
 
Pemrograman Web 9 - Input Form DB dan Session
Pemrograman Web 9 - Input Form DB dan SessionPemrograman Web 9 - Input Form DB dan Session
Pemrograman Web 9 - Input Form DB dan SessionNur Fadli Utomo
 
London XQuery Meetup: Querying the World (Web Scraping)
London XQuery Meetup: Querying the World (Web Scraping)London XQuery Meetup: Querying the World (Web Scraping)
London XQuery Meetup: Querying the World (Web Scraping)Dennis Knochenwefel
 
Drupal Development (Part 2)
Drupal Development (Part 2)Drupal Development (Part 2)
Drupal Development (Part 2)Jeff Eaton
 
Advanced php testing in action
Advanced php testing in actionAdvanced php testing in action
Advanced php testing in actionJace Ju
 
The History of PHPersistence
The History of PHPersistenceThe History of PHPersistence
The History of PHPersistenceHugo Hamon
 
R57shell
R57shellR57shell
R57shellady36
 
Php update and delet operation
Php update and delet operationPhp update and delet operation
Php update and delet operationsyeda zoya mehdi
 
20 modules i haven't yet talked about
20 modules i haven't yet talked about20 modules i haven't yet talked about
20 modules i haven't yet talked aboutTatsuhiko Miyagawa
 
Topological indices (t is) of the graphs to seek qsar models of proteins com...
Topological indices (t is) of the graphs  to seek qsar models of proteins com...Topological indices (t is) of the graphs  to seek qsar models of proteins com...
Topological indices (t is) of the graphs to seek qsar models of proteins com...Jitendra Kumar Gupta
 
Why Hacking WordPress Search Isn't Some Big Scary Thing
Why Hacking WordPress Search Isn't Some Big Scary ThingWhy Hacking WordPress Search Isn't Some Big Scary Thing
Why Hacking WordPress Search Isn't Some Big Scary ThingChris Reynolds
 

Similar to 8時間耐久CakePHP2 勉強会 (20)

C A S Sample Php
C A S Sample PhpC A S Sample Php
C A S Sample Php
 
Pemrograman Web 9 - Input Form DB dan Session
Pemrograman Web 9 - Input Form DB dan SessionPemrograman Web 9 - Input Form DB dan Session
Pemrograman Web 9 - Input Form DB dan Session
 
London XQuery Meetup: Querying the World (Web Scraping)
London XQuery Meetup: Querying the World (Web Scraping)London XQuery Meetup: Querying the World (Web Scraping)
London XQuery Meetup: Querying the World (Web Scraping)
 
Drupal Development (Part 2)
Drupal Development (Part 2)Drupal Development (Part 2)
Drupal Development (Part 2)
 
Advanced php testing in action
Advanced php testing in actionAdvanced php testing in action
Advanced php testing in action
 
The History of PHPersistence
The History of PHPersistenceThe History of PHPersistence
The History of PHPersistence
 
Php (1)
Php (1)Php (1)
Php (1)
 
Presentation1
Presentation1Presentation1
Presentation1
 
logic321
logic321logic321
logic321
 
Blog Hacks 2011
Blog Hacks 2011Blog Hacks 2011
Blog Hacks 2011
 
Php 101: PDO
Php 101: PDOPhp 101: PDO
Php 101: PDO
 
Oops in php
Oops in phpOops in php
Oops in php
 
Shell.php
Shell.phpShell.php
Shell.php
 
php plus mysql
php plus mysqlphp plus mysql
php plus mysql
 
R57shell
R57shellR57shell
R57shell
 
Intermediate PHP
Intermediate PHPIntermediate PHP
Intermediate PHP
 
Php update and delet operation
Php update and delet operationPhp update and delet operation
Php update and delet operation
 
20 modules i haven't yet talked about
20 modules i haven't yet talked about20 modules i haven't yet talked about
20 modules i haven't yet talked about
 
Topological indices (t is) of the graphs to seek qsar models of proteins com...
Topological indices (t is) of the graphs  to seek qsar models of proteins com...Topological indices (t is) of the graphs  to seek qsar models of proteins com...
Topological indices (t is) of the graphs to seek qsar models of proteins com...
 
Why Hacking WordPress Search Isn't Some Big Scary Thing
Why Hacking WordPress Search Isn't Some Big Scary ThingWhy Hacking WordPress Search Isn't Some Big Scary Thing
Why Hacking WordPress Search Isn't Some Big Scary Thing
 

More from Yusuke Ando

ダイナミック広告の改善と拡大
ダイナミック広告の改善と拡大ダイナミック広告の改善と拡大
ダイナミック広告の改善と拡大Yusuke Ando
 
DevOpsを実現するChef活用テクニック
DevOpsを実現するChef活用テクニックDevOpsを実現するChef活用テクニック
DevOpsを実現するChef活用テクニックYusuke Ando
 
DevOpsを実現する為のChef実践テクニック Chef12対応版
DevOpsを実現する為のChef実践テクニック Chef12対応版DevOpsを実現する為のChef実践テクニック Chef12対応版
DevOpsを実現する為のChef実践テクニック Chef12対応版Yusuke Ando
 
Testing your app with Selenium on Travis CI
Testing your app with Selenium on Travis CITesting your app with Selenium on Travis CI
Testing your app with Selenium on Travis CIYusuke Ando
 
Travis CIで実現するPHPアプリの自動テスト
Travis CIで実現するPHPアプリの自動テストTravis CIで実現するPHPアプリの自動テスト
Travis CIで実現するPHPアプリの自動テストYusuke Ando
 
Shimokita.Unity Detonatorで爆発
Shimokita.Unity Detonatorで爆発Shimokita.Unity Detonatorで爆発
Shimokita.Unity Detonatorで爆発Yusuke Ando
 
Shimokita.Unity RigidbodyとColliderで衝突
Shimokita.Unity RigidbodyとColliderで衝突Shimokita.Unity RigidbodyとColliderで衝突
Shimokita.Unity RigidbodyとColliderで衝突Yusuke Ando
 
Webプログラマの為のUnity入門
Webプログラマの為のUnity入門Webプログラマの為のUnity入門
Webプログラマの為のUnity入門Yusuke Ando
 
ゴールデンウィークに最適な学習コンテンツ
ゴールデンウィークに最適な学習コンテンツゴールデンウィークに最適な学習コンテンツ
ゴールデンウィークに最適な学習コンテンツYusuke Ando
 
Travis CIですぐに始める継続的インテグレーション
Travis CIですぐに始める継続的インテグレーションTravis CIですぐに始める継続的インテグレーション
Travis CIですぐに始める継続的インテグレーションYusuke Ando
 
ブログやサイトのJekyllへの移行
ブログやサイトのJekyllへの移行ブログやサイトのJekyllへの移行
ブログやサイトのJekyllへの移行Yusuke Ando
 
PHPとTravis CIでブラウザテスト
PHPとTravis CIでブラウザテストPHPとTravis CIでブラウザテスト
PHPとTravis CIでブラウザテストYusuke Ando
 
Shimokita.Unity パリの街をユニティちゃんが駆ける
Shimokita.Unity パリの街をユニティちゃんが駆けるShimokita.Unity パリの街をユニティちゃんが駆ける
Shimokita.Unity パリの街をユニティちゃんが駆けるYusuke Ando
 
Engine Yardで作る NetCommons3のクラウド環境
Engine Yardで作る NetCommons3のクラウド環境Engine Yardで作る NetCommons3のクラウド環境
Engine Yardで作る NetCommons3のクラウド環境Yusuke Ando
 
Engine Yard Cloud
Engine Yard CloudEngine Yard Cloud
Engine Yard CloudYusuke Ando
 
最近のCandyCane - PHP版Redmineでタスク管理を始めよう
最近のCandyCane - PHP版Redmineでタスク管理を始めよう最近のCandyCane - PHP版Redmineでタスク管理を始めよう
最近のCandyCane - PHP版Redmineでタスク管理を始めようYusuke Ando
 
PHPの教室「foreachを極める」
PHPの教室「foreachを極める」PHPの教室「foreachを極める」
PHPの教室「foreachを極める」Yusuke Ando
 

More from Yusuke Ando (20)

ダイナミック広告の改善と拡大
ダイナミック広告の改善と拡大ダイナミック広告の改善と拡大
ダイナミック広告の改善と拡大
 
DevOpsを実現するChef活用テクニック
DevOpsを実現するChef活用テクニックDevOpsを実現するChef活用テクニック
DevOpsを実現するChef活用テクニック
 
DevOpsを実現する為のChef実践テクニック Chef12対応版
DevOpsを実現する為のChef実践テクニック Chef12対応版DevOpsを実現する為のChef実践テクニック Chef12対応版
DevOpsを実現する為のChef実践テクニック Chef12対応版
 
Testing your app with Selenium on Travis CI
Testing your app with Selenium on Travis CITesting your app with Selenium on Travis CI
Testing your app with Selenium on Travis CI
 
Travis CIで実現するPHPアプリの自動テスト
Travis CIで実現するPHPアプリの自動テストTravis CIで実現するPHPアプリの自動テスト
Travis CIで実現するPHPアプリの自動テスト
 
Shimokita.Unity Detonatorで爆発
Shimokita.Unity Detonatorで爆発Shimokita.Unity Detonatorで爆発
Shimokita.Unity Detonatorで爆発
 
Shimokita.Unity RigidbodyとColliderで衝突
Shimokita.Unity RigidbodyとColliderで衝突Shimokita.Unity RigidbodyとColliderで衝突
Shimokita.Unity RigidbodyとColliderで衝突
 
Webプログラマの為のUnity入門
Webプログラマの為のUnity入門Webプログラマの為のUnity入門
Webプログラマの為のUnity入門
 
ゴールデンウィークに最適な学習コンテンツ
ゴールデンウィークに最適な学習コンテンツゴールデンウィークに最適な学習コンテンツ
ゴールデンウィークに最適な学習コンテンツ
 
Travis CIですぐに始める継続的インテグレーション
Travis CIですぐに始める継続的インテグレーションTravis CIですぐに始める継続的インテグレーション
Travis CIですぐに始める継続的インテグレーション
 
ブログやサイトのJekyllへの移行
ブログやサイトのJekyllへの移行ブログやサイトのJekyllへの移行
ブログやサイトのJekyllへの移行
 
PHPとTravis CIでブラウザテスト
PHPとTravis CIでブラウザテストPHPとTravis CIでブラウザテスト
PHPとTravis CIでブラウザテスト
 
Shimokita.Unity パリの街をユニティちゃんが駆ける
Shimokita.Unity パリの街をユニティちゃんが駆けるShimokita.Unity パリの街をユニティちゃんが駆ける
Shimokita.Unity パリの街をユニティちゃんが駆ける
 
Dev opschef
Dev opschefDev opschef
Dev opschef
 
Paa s and oss
Paa s and ossPaa s and oss
Paa s and oss
 
New relic
New relicNew relic
New relic
 
Engine Yardで作る NetCommons3のクラウド環境
Engine Yardで作る NetCommons3のクラウド環境Engine Yardで作る NetCommons3のクラウド環境
Engine Yardで作る NetCommons3のクラウド環境
 
Engine Yard Cloud
Engine Yard CloudEngine Yard Cloud
Engine Yard Cloud
 
最近のCandyCane - PHP版Redmineでタスク管理を始めよう
最近のCandyCane - PHP版Redmineでタスク管理を始めよう最近のCandyCane - PHP版Redmineでタスク管理を始めよう
最近のCandyCane - PHP版Redmineでタスク管理を始めよう
 
PHPの教室「foreachを極める」
PHPの教室「foreachを極める」PHPの教室「foreachを極める」
PHPの教室「foreachを極める」
 

Recently uploaded

A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 

Recently uploaded (20)

A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 

8時間耐久CakePHP2 勉強会

  • 1. CakePHP2 CakePHP Yusuke Ando (@yando) Yusuke Ando (@yando)
  • 2. CakePHP Yusuke Ando (@yando)
  • 3. CakePHP Yusuke Ando (@yando)
  • 4. CakePHP Yusuke Ando (@yando)
  • 5. by crabchick CakePHP Yusuke Ando (@yando)
  • 6. CakePHP Yusuke Ando (@yando)
  • 7. CakePHP Yusuke Ando (@yando)
  • 8. CakePHP Yusuke Ando (@yando)
  • 9. CakePHP Yusuke Ando (@yando)
  • 10. CakePHP Yusuke Ando (@yando)
  • 11. <?php $keyword = ''; if (isset($_POST['keyword'])) { $keyword = $_POST['keyword']; } mysql_connect('localhost','user','password'); mysql_select_db('cakephp_sample'); mysql_query('set names utf8'); $sql = sprintf( "SELECT id,name,description FROM friends WHERE name LIKE '%s'", mysql_real_escape_string('%'.$keyword.'%') ); $result = mysql_query($sql); $data = array(); while ($row = mysql_fetch_assoc($result)) { $data[] = $row; } ?> <html> <head><title> </title></head> <body> <form action="list1.php" method="POST"> <input name="keyword"><input type="submit"> </form> <ul> <?php foreach ($data as $row) { echo '<li>'; echo $row['name']; echo $row['description']; echo '</li>'; } ?></ul> </body></html> CakePHP Yusuke Ando (@yando)
  • 12. <?php $keyword = ''; if (isset($_POST['keyword'])) { $keyword = $_POST['keyword']; } mysql_connect('localhost','user','password'); mysql_select_db('cakephp_sample'); mysql_query('set names utf8'); $sql = sprintf( "SELECT id,name,description FROM friends WHERE name LIKE '%s'", mysql_real_escape_string('%'.$keyword.'%') ); $result = mysql_query($sql); $data = array(); while ($row = mysql_fetch_assoc($result)) { $data[] = $row; } ?> <html> <head><title> </title></head> <body> <form action="list1.php" method="POST"> <input name="keyword"><input type="submit"> </form> <ul> <?php foreach ($data as $row) { echo '<li>'; echo $row['name']; echo $row['description']; echo '</li>'; } ?></ul> </body></html> CakePHP Yusuke Ando (@yando)
  • 13. <?php //model.php mysql_connect('localhost','user','password'); mysql_select_db('cakephp_sample'); mysql_query('set names utf8'); $sql = sprintf( "SELECT id,name,description FROM friends WHERE name LIKE '%s'", mysql_real_escape_string('%'.$keyword.'%') ); $result = mysql_query($sql); $data = array(); while ($row = mysql_fetch_assoc($result)) { <?php $data[] = $row; //index.php } $keyword = ''; if (isset($_POST['keyword'])) { $keyword = $_POST['keyword']; } <!-- view.php --> include ‘model.php’; <html> include ‘view.php’; <head><title> </title></head> <body> <form action="list1.php" method="POST"> <input name="keyword"><input type="submit"> </form> <ul> <?php foreach ($data as $row) { echo '<li>'; echo $row['name']; echo $row['description']; echo '</li>'; } ?></ul> </body></html> CakePHP Yusuke Ando (@yando)
  • 14. CakePHP Yusuke Ando (@yando)
  • 15. CakePHP Yusuke Ando (@yando)
  • 16. CakePHP Yusuke Ando (@yando)
  • 17. CakePHP Yusuke Ando (@yando)
  • 18. CakePHP Yusuke Ando (@yando)
  • 19. CakePHP Yusuke Ando (@yando)
  • 20. CakePHP Yusuke Ando (@yando)
  • 21. /** * To configure CakePHP *not* to use mod_rewrite and to * use CakePHP pretty URLs, remove these .htaccess * files: * * /.htaccess * /app/.htaccess * /app/webroot/.htaccess * * And uncomment the App.baseUrl below: */ //Configure::write('App.baseUrl', env('SCRIPT_NAME')); CakePHP Yusuke Ando (@yando)
  • 22. CakePHP Yusuke Ando (@yando)
  • 23. CakePHP Yusuke Ando (@yando)
  • 24. CakePHP Yusuke Ando (@yando)
  • 25. CakePHP Yusuke Ando (@yando)
  • 26. CakePHP Yusuke Ando (@yando)
  • 27. CakePHP Yusuke Ando (@yando)
  • 28. CakePHP Yusuke Ando (@yando)
  • 29. CakePHP Yusuke Ando (@yando)
  • 30. CakePHP Yusuke Ando (@yando)
  • 31. CakePHP Yusuke Ando (@yando)
  • 32. CakePHP Yusuke Ando (@yando)
  • 33. CakePHP Yusuke Ando (@yando)
  • 34. CakePHP Yusuke Ando (@yando)
  • 35. CakePHP Yusuke Ando (@yando)
  • 36. CakePHP Yusuke Ando (@yando)
  • 37. CakePHP Yusuke Ando (@yando)
  • 38. CakePHP Yusuke Ando (@yando)
  • 39. CakePHP Yusuke Ando (@yando)
  • 40. CakePHP Yusuke Ando (@yando)
  • 41. CakePHP Yusuke Ando (@yando)
  • 42. CakePHP Yusuke Ando (@yando)
  • 43. CakePHP Yusuke Ando (@yando)
  • 44. CakePHP Yusuke Ando (@yando)
  • 45. CakePHP Yusuke Ando (@yando)
  • 46. CakePHP Yusuke Ando (@yando)
  • 47. CakePHP Yusuke Ando (@yando)
  • 48. CakePHP Yusuke Ando (@yando)
  • 49. CakePHP Yusuke Ando (@yando)
  • 50. CakePHP Yusuke Ando (@yando)
  • 51. CakePHP Yusuke Ando (@yando)
  • 52. CakePHP Yusuke Ando (@yando)
  • 53. CakePHP Yusuke Ando (@yando)
  • 54. CakePHP Yusuke Ando (@yando)
  • 55. CakePHP Yusuke Ando (@yando)
  • 56. CakePHP Yusuke Ando (@yando)
  • 57. CakePHP Yusuke Ando (@yando)
  • 58. CakePHP Yusuke Ando (@yando)
  • 59. CakePHP Yusuke Ando (@yando)
  • 60. CakePHP Yusuke Ando (@yando)
  • 61. CakePHP Yusuke Ando (@yando)
  • 62. CakePHP Yusuke Ando (@yando)
  • 63. CakePHP Yusuke Ando (@yando)
  • 64. CakePHP Yusuke Ando (@yando)
  • 65. CakePHP Yusuke Ando (@yando)
  • 66. CakePHP Yusuke Ando (@yando)
  • 67. CakePHP Yusuke Ando (@yando)
  • 68. CakePHP Yusuke Ando (@yando)
  • 69. CakePHP Yusuke Ando (@yando)
  • 70. CakePHP Yusuke Ando (@yando)
  • 71. CakePHP Yusuke Ando (@yando)
  • 72. CakePHP Yusuke Ando (@yando)