Presentation is loading. Please wait.

Presentation is loading. Please wait.

PHP and mySQL 2/9/2007. What is PHP?  From php.net “PHP is a widely-used general- purpose scripting language that is especially suited for Web development.

Similar presentations


Presentation on theme: "PHP and mySQL 2/9/2007. What is PHP?  From php.net “PHP is a widely-used general- purpose scripting language that is especially suited for Web development."— Presentation transcript:

1 PHP and mySQL 2/9/2007

2 What is PHP?  From php.net “PHP is a widely-used general- purpose scripting language that is especially suited for Web development and can be embedded into HTML”  From IBM “PHP is the market-leading dynamic language for producing modern Web applications.”  Usage Usage  Random link Random link  On-line documentation - www.php.netwww.php.net  From php.net “PHP is a widely-used general- purpose scripting language that is especially suited for Web development and can be embedded into HTML”  From IBM “PHP is the market-leading dynamic language for producing modern Web applications.”  Usage Usage  Random link Random link  On-line documentation - www.php.netwww.php.net

3 What is mySQL?  From http://www.mysql.com/why-mysql/ “the MySQL® database has become the world's most popular open source database because of its consistent fast performance, high reliability and ease of use. It's used in more than 10 million installations ranging from large corporations to specialized embedded applications on every continent in the world.”http://www.mysql.com/why-mysql/  Top 10 Reasons for mySQL Top 10 Reasons for mySQL  Random Link Random Link  Fastest growing fields Fastest growing fields  From http://www.mysql.com/why-mysql/ “the MySQL® database has become the world's most popular open source database because of its consistent fast performance, high reliability and ease of use. It's used in more than 10 million installations ranging from large corporations to specialized embedded applications on every continent in the world.”http://www.mysql.com/why-mysql/  Top 10 Reasons for mySQL Top 10 Reasons for mySQL  Random Link Random Link  Fastest growing fields Fastest growing fields

4 Communication between PHP and a mySQL Database  http://devzone.zend.com/node/view/id/641 http://devzone.zend.com/node/view/id/641  http://devzone.zend.com/node/view/id/641 http://devzone.zend.com/node/view/id/641

5 The Server  mmas.unca.edu  Login: your email account name  Password: “mmas” + the first 4 of the last 5 digits of your university id number.  Example: if my id = 1234567890, my password will be mmas6789  mmas.unca.edu  Login: your email account name  Password: “mmas” + the first 4 of the last 5 digits of your university id number.  Example: if my id = 1234567890, my password will be mmas6789

6 Accessing mySQL and PHP  If you execute which php and which mysql you will see antiquated versions. We want to use current versions which are installed at /usr/local/…  Change your PATH in your.profile in your home directory  If you execute which php and which mysql you will see antiquated versions. We want to use current versions which are installed at /usr/local/…  Change your PATH in your.profile in your home directory

7 Set up access on the database  From the mySQL command line:  grant select on nallbbco_bonsaidb.* to rfidclass@"%" identified by 'bonsai' ;  From the mySQL command line:  grant select on nallbbco_bonsaidb.* to rfidclass@"%" identified by 'bonsai' ;

8 Accessing the Database from the Command Line multimedia:~ reiser$ mysql -u rfidclass -pbonsai Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 14 to server version: 5.0.27-standard-log Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> multimedia:~ reiser$ mysql -u rfidclass -pbonsai Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 14 to server version: 5.0.27-standard-log Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql>

9 mysql> use nallbbco_bonsaidb Database changed mysql> show tables; +-----------------------------+ | Tables_in_nallbbco_bonsaidb | +-----------------------------+ | biology | | grouping | | grp_audio | | grp_image | | grp_video | | grpbio | | link | | news | | pos | | shelf | +-----------------------------+ 10 rows in set (0.00 sec) mysql> use nallbbco_bonsaidb Database changed mysql> show tables; +-----------------------------+ | Tables_in_nallbbco_bonsaidb | +-----------------------------+ | biology | | grouping | | grp_audio | | grp_image | | grp_video | | grpbio | | link | | news | | pos | | shelf | +-----------------------------+ 10 rows in set (0.00 sec)

10 Using Dreamweaver with PHP and mySQL  Dreamweaver is Adobe’s web authoring software and it has fairly good support for php and mySQL.  You can download a trial version of Dreamweaver for 1 month’s free use.  You may use Dreamweaver in either of the MMAS labs - RBH 223 and KH 245  Those stations are not secure.  Do not leave your files on the desktop - if you work locally, copy the site folder to the server and delete it before leaving the lab.  Logout of the server before leaving the computer.  Close the door behnd you when you leave the lab.  Dreamweaver is Adobe’s web authoring software and it has fairly good support for php and mySQL.  You can download a trial version of Dreamweaver for 1 month’s free use.  You may use Dreamweaver in either of the MMAS labs - RBH 223 and KH 245  Those stations are not secure.  Do not leave your files on the desktop - if you work locally, copy the site folder to the server and delete it before leaving the lab.  Logout of the server before leaving the computer.  Close the door behnd you when you leave the lab.

11 Features in Dreamweaver  Built in validation.  Point and click interface.  Ability to view the code in the Code window; and edit the code for optimization, tweaking and customization.  Instant gratification of previewing in the Design window.  Built in validation.  Point and click interface.  Ability to view the code in the Code window; and edit the code for optimization, tweaking and customization.  Instant gratification of previewing in the Design window.


Download ppt "PHP and mySQL 2/9/2007. What is PHP?  From php.net “PHP is a widely-used general- purpose scripting language that is especially suited for Web development."

Similar presentations


Ads by Google