PHP MySQL - Ia801708.us.archive

1y ago
11 Views
1 Downloads
1.09 MB
21 Pages
Last View : Today
Last Download : 3m ago
Upload by : Victor Nelms
Transcription

UQC103S1 UFCE47-20-1 Systems Development uqc103s/UFCE47-20-1 PHP-mySQL 1

Who? Email: uqc103s1@uwe.ac.uk Web Site www.cems.uwe.ac.uk/ jedawson www.cems.uwe.ac.uk/ jtwebb/uqc103s1/ uqc103s/UFCE47-20-1 PHP-mySQL 2

HELP is at HAND uqc103s/UFCE47-20-1 PHP-mySQL 3

PHP and mySQL A crash course In this lecture we will consider: What is mySQL? Why PHP and mySQL? How to get and install PHP/mySQL Some SQL Using mySQL (command line) Using PHP and mySQL uqc103s/UFCE47-20-1 PHP-mySQL 4

What is mySQL? The World’s Most Popular Open Source Database A DBMS - Database Management System more than 4 million active installations Supports a database and allow client/server interactions (storing and retrieving information) On a large system a computer may be solely dedicated to running the DBMS A DBA (DataBase Administrator) usually manages the database Usually a DBMS is very expensive to buy and/or maintain. uqc103s/UFCE47-20-1 PHP-mySQL 5

mySQL has Speed - written in C/C , multithreaded,optimised Full data set - supports: float,double, enum, date, char, varchar etc. Full Command set (SQL92 compliant) select, insert, delete, show, "aliases" etc Functions - e.g. avg(), sum(), max() Security - privilege and password system Scalable - can take billions of rows of data Large character set for internationalisation Tools - admin and other access uqc103s/UFCE47-20-1 PHP-mySQL 6

Why PHP and mySQL MySQL is a key part of LAMP (Linux, Apache, MySQL, PHP / Perl / Python), a fast growing open source enterprise software stack. More and more companies are using LAMP as an alternative to expensive proprietary software stacks because of its lower cost and freedom from lock-in. http://www.mysql.com/company/index.html uqc103s/UFCE47-20-1 PHP-mySQL 7

How to get and install PHP/mySQL MySQL NOTE: In Apache users web pages are in install dir\htdocs http://www.mysql.com/downloads/index.html But don’t forget (mini -XAMPP) !! Apache/mySQL/PHP/Perl - download and install instructions (the "old" method should work OK) http://www.apachefriends.org/xampp-windows-en.html mini-xampp download is about 13 Mb uqc103s/UFCE47-20-1 PHP-mySQL 8

Starting Apache and mySQL Scripts to start and stop are in the minixampp install directory Starting Apache starts an HTTP service on port 80 (default) Starting mySQL starts a service on port 3066 (default) http://localhost/ or http://127.0.0.1/ NOTE: XAMPP contains a good admin tool for mySQL http://localhost/phpmyadmin/ Apache (minixampp) users web pages are in: install dir\htdocs uqc103s/UFCE47-20-1 PHP-mySQL 9

Stopping and Starting uqc103s/UFCE47-20-1 PHP-mySQL 10

Basic SQL SQL - Structured Query Language "sequel" or "ess-cue-el" We will consider: creating a database creating a table populating a table (inserting data) viewing a table (selecting data and ordering it) changing data (updating data) deleting data uqc103s/UFCE47-20-1 PHP-mySQL 11

Using SQL with mySQL In the simplest case can use mySQL "on the command line" (DOS prompt) the command to use mysql : install dir\mysql\bin\mysql get a command prompt and change to the bin folder (or add mysql to your path) make sure mysql service has been started type "mysql" on the command line uqc103s/UFCE47-20-1 PHP-mySQL 12

Connecting to mySQL creating a database and a table uqc103s/UFCE47-20-1 PHP-mySQL 13

Populating a table Viewing contents uqc103s/UFCE47-20-1 PHP-mySQL 14

More about select uqc103s/UFCE47-20-1 PHP-mySQL 15

Changing and Deleting Data uqc103s/UFCE47-20-1 PHP-mySQL 16

Using mySQL with PHP Example One: connect to mySQL select a database define a query execute query present results free resources Program - mysql1.php uqc103s/UFCE47-20-1 PHP-mySQL 17

PHP/mySQL - column headings We can add a bit more detail: improved formatting order by in select insert new data adding column names LINK: mysql2.php uqc103s/UFCE47-20-1 PHP-mySQL 18

Using PHP with HTML forms The form PHP is commonly used to process HTML forms cf. CGI programs See search1.html uqc103s/UFCE47-20-1 PHP-mySQL 19

The PHP Check input is OK connect to database run query check output process as before See: form1.php uqc103s/UFCE47-20-1 PHP-mySQL 20

Some Helpful URLs mySQL - reference and tutorial PHP/mySQL tutorial ySQL tutorial http://www.mysql.com/doc/en/Tutorial.html html?t w programming Learn SQL http://www.w3schools.com/sql/default.asp PHP to MS Access (ODBC) example http://www.w3schools.com/php/php db odbc.asp uqc103s/UFCE47-20-1 PHP-mySQL 21

uqc103s/UFCE47-20-1 PHP-mySQL 7 Why PHP and mySQL „ MySQL is a key part of LAMP (Linux, Apache, MySQL, PHP / Perl / Python), a fast growing open source enterprise software stack. More and more companies are using LAMP as an alternative to expensive proprietary software stacks because of its lower cost and freedom from lock-in.

Related Documents:

PHP/MySQL Tutorial Lesson 1 by Graeme Merrall Page 1 — Introducing PHP and MySQL Unless you've been living on Mars for the last six to eight months, you've heard of open source software (OSS). This movement has got so much momentum that even the big boys are taking notice.

MySQL PHP Syntax MySQL works very well in combination of various programming languages like PERL, C, C , JAVA and PHP. Out of these languages, PHP is the most popular one because of its web application development capabilities. PHP provides various functions to access MySQL database and to manipulate data records inside MySQL database.

MySQL is no longer enabled by default, so the php_mysql.dllDLL must be enabled inside of php.ini. Also, PHP needs access to the MySQL client library. A file named libmysql.dllis included in the Windows PHP distribution and in order for PHP to talk to MySQL this file needs to be available to the Windows systems PATH. See the FAQ titled "How do I add my PHP directory to the PATHon Windows" for .

Section 4: PHP and MySQL - The Structured Repository 4.1 PHP MySQL Connectivity 4.2 Integrating Web Forms and Database 4.3 Using PHP’s MySQL Extension 4.4 Using PHP’s PDO Extension Section 5: Learn More Advanced Techniques in PHP 5.1 Introduction to Object Oriented Programming 5.2 Classes and Objects

PHP is FREE to download from the official PHP resource: www.php.net PHP is easy to learn and runs efficiently on the server side Where to Start? To get access to a web server with PHP support, you can: Install Apache (or IIS) on your own server, install PHP, and MySQL Or find a web hosting plan with PHP and

MySQL for Excel is a 32-bit add-in for Microsoft Excel, which you can install and run on Microsoft Windows. MySQL for Excel is not compatible with Linux or macOS. MySQL for Excel can interact with MySQL Workbench to simplify the management of MySQL connections when both MySQL client tools are installed.

Lifetime Support Oracle Premier Support Oracle Product Certifications MySQL Enterprise High Availability MySQL Enterprise Security MySQL Enterprise Scalability MySQL Enterprise Backup MySQL Enterprise Monitor/Query Analyzer MySQL Workbench MySQL Enterprise Edition. 11 MySQL Database

Alfredo López Austin “Rayamiento (Tlahuahuanaliztli)” p. 15-22 : Juegos rituales aztecas Alfredo López Austin (versión, introducción y notas) México Universidad Nacional Autónoma de México . Instituto de Investigaciones Históricas : 1967 . 94 p. (Cuadernos Serie Documental 5) [Sin ISBN] Formato: PDF Publicado en línea: 21 de noviembre de 2018 . Disponible en: www.historicas.unam .