1 / 23

#4 Database-driven Websites: phpMyAdmin

#4 Database-driven Websites: phpMyAdmin. Jean Lacoste Department of Accounting and Information Systems FDI Summer lacoste@vt.edu. Dynamic Web Pages. phpMyAdmin. Database management system used to: Setup tables* Add, change and delete data Query tables Graphical user interface.

yovela
Download Presentation

#4 Database-driven Websites: phpMyAdmin

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. #4Database-driven Websites:phpMyAdmin Jean Lacoste Department of Accounting and Information Systems FDI Summer lacoste@vt.edu

  2. Dynamic Web Pages

  3. phpMyAdmin • Database management system used to: • Setup tables* • Add, change and delete data • Query tables • Graphical user interface

  4. Login to phpMyAdmin http://www.fdi.hosting.vt.edu/fdi/phpmyadmin phpMyAdmin Username phpMyAdmin Password

  5. Exercise #8 Log into phpMyAdmin

  6. Database Database name

  7. Creating Tables

  8. Defining Fields Specify which field is primary key VarChar requires # characters. Set & Enum require list of values. Unique name Value if User enters nothing Automatically Increment value For each new record Required field Kind of data to be entered into field

  9. Datatypes • Numeric • Integer • Decimal • Boolean (0 = False) • String • Date & Time

  10. Exercise #9 Create the table for our example application. Name the table phpuser. Name your fields as they appear in the solution to Exercise #7 which is included on the next slide.

  11. username – primary key password name email affiliation = faculty, staff, student college = 3 character abbreviation note All of the following will have values of y or n: dreamweaver html db php programming Exercise #7 Solution

  12. Exercise #9: Solution

  13. mySQL Generated

  14. Adding Data INSERT INTO `address` ( `name` , `street` , `zip` ) VALUES ('Jean', '3076 Pamplin Hall', '24060');

  15. Finding Data Wildcard character

  16. SQL – Select Statement SELECT `name` , `street` , `zip` FROM `address` WHERE 1 AND `street` LIKE '105 Main St%' AND `zip` = '24091' ORDER BY `name` ASC   LIMIT 0 , 30

  17. Modifying Data UPDATE `address` SET `street` = '3007 Pamplin Hall' WHERE `name` = 'Jean' LIMIT 1 ;

  18. Deleting Data DELETE FROM `address` WHERE `name` = ‘Crey’ LIMIT 1

  19. Exercise #10 Add, modify and delete data from the table using phpMyAdmin. Find specific data by creating several queries based on different search criteria.

  20. Import • Used to populate tables. • Create a comma delimited file (in Excel).

  21. Import Settings Check if imported data should overwrite existing data comma delimited file Change to a comma

  22. Export Select Select • Used to copy all data from one table to another application such as Excel. • Highlight resulting text. • Paste into NotePad and save. • Open in another application.

  23. Evaluations • https://www.fdi.vt.edu/Evals/ • Track P1 Evaluations • Database

More Related