THE WEBMASTERS: SENG + WAVERING. On account of construction, we will be having class in room 1248...
-
Upload
griffin-copeland -
Category
Documents
-
view
215 -
download
1
Transcript of THE WEBMASTERS: SENG + WAVERING. On account of construction, we will be having class in room 1248...
![Page 1: THE WEBMASTERS: SENG + WAVERING. On account of construction, we will be having class in room 1248 next week.](https://reader036.fdocuments.us/reader036/viewer/2022062713/56649f4d5503460f94c6e049/html5/thumbnails/1.jpg)
THE WEBMASTERS: SENG + WAVERING
![Page 2: THE WEBMASTERS: SENG + WAVERING. On account of construction, we will be having class in room 1248 next week.](https://reader036.fdocuments.us/reader036/viewer/2022062713/56649f4d5503460f94c6e049/html5/thumbnails/2.jpg)
![Page 3: THE WEBMASTERS: SENG + WAVERING. On account of construction, we will be having class in room 1248 next week.](https://reader036.fdocuments.us/reader036/viewer/2022062713/56649f4d5503460f94c6e049/html5/thumbnails/3.jpg)
On account of construction, we will be having class in room 1248 next week.
![Page 4: THE WEBMASTERS: SENG + WAVERING. On account of construction, we will be having class in room 1248 next week.](https://reader036.fdocuments.us/reader036/viewer/2022062713/56649f4d5503460f94c6e049/html5/thumbnails/4.jpg)
We have used variables to store information for our websites to use. How do we store information for websites to use even when people close their browsers and sign off?
![Page 5: THE WEBMASTERS: SENG + WAVERING. On account of construction, we will be having class in room 1248 next week.](https://reader036.fdocuments.us/reader036/viewer/2022062713/56649f4d5503460f94c6e049/html5/thumbnails/5.jpg)
Databases!Allow for persistent storage of data
![Page 6: THE WEBMASTERS: SENG + WAVERING. On account of construction, we will be having class in room 1248 next week.](https://reader036.fdocuments.us/reader036/viewer/2022062713/56649f4d5503460f94c6e049/html5/thumbnails/6.jpg)
Databases are a way to store information without relying on Javascript or PHP variables.
A database is a table of objects – like an spreadsheet.
Columns define attributes of an object
Each row is a separate object
![Page 7: THE WEBMASTERS: SENG + WAVERING. On account of construction, we will be having class in room 1248 next week.](https://reader036.fdocuments.us/reader036/viewer/2022062713/56649f4d5503460f94c6e049/html5/thumbnails/7.jpg)
SQL – Structured Query LanguageA way of talking to a database which
lets us implement CRUDCRUD – the four basic functions of
persistent storage: Create, Retrieve, Update Delete
![Page 8: THE WEBMASTERS: SENG + WAVERING. On account of construction, we will be having class in room 1248 next week.](https://reader036.fdocuments.us/reader036/viewer/2022062713/56649f4d5503460f94c6e049/html5/thumbnails/8.jpg)
Combine basic commands and elements to form clauses
Clauses combine to form statementsUse phpMyAdmin to work with
databaseshttp://demo.phpmyadmin.net/trunk-c
onfig/
![Page 9: THE WEBMASTERS: SENG + WAVERING. On account of construction, we will be having class in room 1248 next week.](https://reader036.fdocuments.us/reader036/viewer/2022062713/56649f4d5503460f94c6e049/html5/thumbnails/9.jpg)
CREATE DATABASE WebshipUSE WebshipCREATE TABLE studentsDefine columnsSELECT * FROMMany other commands!
![Page 10: THE WEBMASTERS: SENG + WAVERING. On account of construction, we will be having class in room 1248 next week.](https://reader036.fdocuments.us/reader036/viewer/2022062713/56649f4d5503460f94c6e049/html5/thumbnails/10.jpg)
We will still use Javascript and PHP variables – need some way to take information from database and use it to create a webpage.
![Page 11: THE WEBMASTERS: SENG + WAVERING. On account of construction, we will be having class in room 1248 next week.](https://reader036.fdocuments.us/reader036/viewer/2022062713/56649f4d5503460f94c6e049/html5/thumbnails/11.jpg)
Can send SQL queries to database with PHP
mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
Can assign PHP variables as the results returned from MySQL queries
$variable = mysql_query("SELECT * FROM example")