© Anselm Spoerri Web Design Information Visualization Course Prof. Anselm Spoerri

Slides:



Advertisements
Similar presentations
How to Create a Local Collection
Advertisements

PubMed Overview From the main HINARI webpage, we can access PubMed by clicking on Search HINARI journal articles through PubMed (Medline). Note: If you.
PHP I.
PHP II Interacting with Database Data. The whole idea of a database-driven website is to enable the content of the site to reside in a database, and to.
Widhy Hayuhardhika NP, S.Kom. Overview of database structure Connecting to MySQL database Selecting the database to use Using the require_once statement.
DATA WAREHOUSE QueryLink TUTORIAL QueryLink is used to retrieve Campus data for Departmental use. This tutorial presents an overview of the point and click.
© Anselm SpoerriInfo + Web Tech Course Information Technologies Info + Web Tech Course Anselm Spoerri PhD (MIT) Rutgers University
© Anselm SpoerriInfo + Web Tech Course Information Technologies Info + Web Tech Course Anselm Spoerri PhD (MIT) Rutgers University
© Anselm SpoerriInfo + Web Tech Course Information Technologies Info + Web Tech Course Anselm Spoerri PhD (MIT) Rutgers University
Kirkwood Center for Continuing Education Introduction to PHP and MySQL By Fred McClurg, Copyright © 2010 All Rights Reserved. 1.
© Anselm SpoerriInfo + Web Tech Course Information Technologies Info + Web Tech Course Anselm Spoerri PhD (MIT) Rutgers University
SUNY Morrisville-Norwich Campus-Week 12 CITA 130 Advanced Computer Applications II Spring 2005 Prof. Tom Smith.
© Anselm SpoerriInfo + Web Tech Course Information Technologies Info + Web Tech Course Anselm Spoerri PhD (MIT) Rutgers University
U:/msu/course/cse/103 Day 23, Slide 1 Review of Day 22 What query did you use to search for an actor by name? –Return matches.
Attribute databases. GIS Definition Diagram Output Query Results.
1 Foundations of Software Design Lecture 27: Java Database Programming Marti Hearst Fall 2002.
© Anselm Spoerri Web Design Information Visualization Course Prof. Anselm Spoerri
8 Copyright © 2004, Oracle. All rights reserved. Creating LOVs and Editors.
Informer Web Reporting Basic Reporting
Application Development Description and exemplification of server-side scripting language for server connection, database selection, execution of SQL queries.
U:/msu/course/cse/103 Day 25, Slide 1 Back-up PHP Files If you have not yet passed the 3.0 BT, make back-up copies of ALL.
1Computer Sciences Department Princess Nourah bint Abdulrahman University.
Server-side Scripting Powering the webs favourite services.
4-1 INTERNET DATABASE CONNECTOR Colorado Technical University IT420 Tim Peterson.
Advanced Database Management System Lab no. 11. SQL Commands (for MySQL) –Update –Replace –Delete.
XP New Perspectives on Microsoft Access 2002 Tutorial 51 Microsoft Access 2002 Tutorial 5 – Enhancing a Table’s Design, and Creating Advanced Queries and.
Creating your Webpage with tables. This is a 2 column by 1 row table!
1 PHP and MySQL. 2 Topics  Querying Data with PHP  User-Driven Querying  Writing Data with PHP and MySQL PHP and MySQL.
PHP meets MySQL.
1 Accelerated Web Development Course JavaScript and Client side programming Day 2 Rich Roth On The Net
Introduction to Entity Framework Part 2 CRUD Scaffolding Tom Perkins NTPCUG.
15/10/20151 PHP & MySQL 'Slide materials are based on W3Schools PHP tutorial, 'PHP website 'MySQL website.
PHP MySQL Introduction. MySQL is the most popular open-source database system. What is MySQL? MySQL is a database. The data in MySQL is stored in database.
Creating Dynamic Web Pages Using PHP and MySQL CS 320.
SYST Web Technologies SYST Web Technologies Databases & MySQL.
MS3304: Week 7 Talking to Databases: SQL Basics. Overview Connecting to a database Querying a database Basic SQL syntax for mySQL Writing simple and complex.
Week 7. Lecture 2 Functions, Arrays, PHP&MySQL. Function with More than one argument and a return statement For a function to return a value, the return.
PHP and MySQL CS How Web Site Architectures Work  User’s browser sends HTTP request.  The request may be a form where the action is to call PHP.
Technology & Management Club Development Software Overview.
© Anselm Spoerri Web Design Information Visualization Course Prof. Anselm Spoerri
Learning to Code a Wiki in Confluence Links Images Tables Video.
CSCI 6962: Server-side Design and Programming Database Manipulation in ASP.
IReport Demo Spring 2008 OEDSA Conference. Report Properties.
***Adding items to your Etudes Homepage*** Log into Etudes
Microsoft Access 2000 Presentation 1 The Basics of Access.
 How to create a quiz and teacher code. 1)First find a video on Youtube or other video hosting website and copy the embed code (Video embed code pictured.
CSCI 3327 Visual Basic Chapter 13: Databases and LINQ UTPA – Fall 2011.
© Anselm SpoerriInfo + Web Tech Course Information Technologies Info + Web Tech Course Anselm Spoerri PhD (MIT) Rutgers University
© Anselm Spoerri Web Design Information Visualization Course Prof. Anselm Spoerri
PHP getting data from a MySQL database. Replacing XML as data source with MySQL Previously we obtained the data about the training session from an XML.
NMD202 Web Scripting Week5. What we will cover today PHP & MySQL Displaying Dynamic Pages Exercises Modifying Data PHP Exercises Assignment 1.
Creating a simple database This shows you how to set up a database using PHPMyAdmin (installed with WAMP)
U:/msu/course/cse/103 Day 21, Slide 1 CSE 103 Makeups –If you didn’t take one over the weekend, take one TUESDAY or WEDNESDAY!
Microsoft Access 2000 Creating Queries, Reports and Web Pages.
Selecting Data Database Administration Fundamentals LESSON 3.1a.
Creating Databases applications for the Web: week 2 Basic HTML review, forms HW: Identify unique source for asp, php, Open Source, MySql, Access.
Working With Database Library And Helpers. Connecting to your Database First you need to set parameters in you database.php file residing in config folder.
ADVANCED SQL.  The SQL ORDER BY Keyword  The ORDER BY keyword is used to sort the result-set by one or more columns.  The ORDER BY keyword sorts the.
Web Systems & Technologies
CIIT-Human Computer Interaction-CSC456-Fall-2015-Mr
Creating LOVs and Editors
LESSON 3.1a Database Administration Fundamentals Selecting Data.
Introduction to Web programming
ISC440: Web Programming 2 Server-side Scripting PHP 3
Information Technologies Anselm Spoerri PhD (MIT)
CIS16 Application Programming with Visual Basic
Video list editor BIS1523 – Lecture 24.
Introduction to Web programming
Information Technologies Anselm Spoerri PhD (MIT)
Information Technologies Anselm Spoerri PhD (MIT)
Presentation transcript:

© Anselm Spoerri Web Design Information Visualization Course Prof. Anselm Spoerri

© Anselm Spoerri Lecture 10 – Overview Short Assignment 2 MySQL & PHP code Sample files have been uploaded to Sakai > Resources > PHP Files –Browse View to access –Gigapans (practice in Short Assignment 2) –Photosynths –Videos –Attach Hyperlink to Thumbnail to Link to Individual Item page –Individual Item based on supplied id –Gigapan –Photosynth –Video

© Anselm Spoerri Short Assignment 2 Files to consult and modify Info about MySQL Tables in whereRU in Sakai > Resources databaseConnect_table_gigapan_lastname.php ‒ Shows you how to control number of Gigapans to embed ‒ Shows you how to create table with Gigapan thumbnails Example: databaseConnect_table_gigapan_spoerri.php databaseConnect_table_gigapan_spoerri.php  Change MySQL query so that you retrieve the most recent Gigapans for specific campus  Customize code so that only one embedded Gigapan  Customize code so that only two rows of 5 Gigapan thumbnails are shown Example: databaseConnect_table_gigapan_SA2a_spoerri.php databaseConnect_table_gigapan_SA2a_spoerri.php  Customize & Create CSS code to achieve desired look  Redo above steps for next campus Example: databaseConnect_table_gigapan_SA2bs_spoerri.php databaseConnect_table_gigapan_SA2bs_spoerri.php

© Anselm Spoerri MySQL – Queries "SELECT something FROM tablename"; "SELECT id, title, campus FROM $db_table"; COUNT "SELECT COUNT(*) FROM $db_table"; // number or rows in table WHERE used to narrow results based true expression "SELECT * FROM $db_table WHERE field='value'"; LIKE qualifier allows searches on parts of strings "SELECT * FROM $db_table WHERE field LIKE "%NB%""; LIMIT choose how many rows to return and where to start "SELECT * FROM $db_table LIMIT 3,2"; // skip first 3 rows and return 2 rows ORDER BY sorts results by one or more columns "SELECT * FROM $db_table ORDER BY campus, date_created DESC"; GROUP BY "SELECT * FROM $db_table GROUP BY campus";

© Anselm Spoerri SQL Queries Possible queries: $query = "SELECT * FROM $db_table"; $query = "SELECT * FROM $db_table WHERE campus='Newark'"; $query = "SELECT * FROM $db_table ORDER BY date_created DESC"; $query = "SELECT * FROM $db_table WHERE campus='Newark' ORDER BY date_created DESC";

© Anselm Spoerri Access Gigapans Database Table: $db_table = 'whereru_gigapan'; // description in Sakai Resources Example: databaseConnect_table_gigapan_spoerri.phpdatabaseConnect_table_gigapan_spoerri.php Embed Gigapan: Thumbnail Images: t= 1 (for gigapan) w and h specify width and height of thumbnail Remember: you have to escape \ the quotation marks if used inside an echo statement

© Anselm Spoerri Access Photosynths Database Table: $db_table = 'whereru_photosynth'; // description in Sakai Resources Example: databaseConnect_table_photosynth_spoerri.php databaseConnect_table_photosynth_spoerri.php Embed Photosynth: Remember: you have to escape \ the quotation marks if used inside an echo statement Thumbnail Images: t= 2 (for photosynth) w and h specify width and height of thumbnail Remember: you have to escape \ the quotation marks if used inside an echo statement

© Anselm Spoerri Access Videos Database Table: $db_table = 'whereru_video'; // description in Sakai Resources Example: databaseConnect_table_video_spoerri.php databaseConnect_table_video_spoerri.php Embed Video: Remember: you have to escape \ the quotation marks if used inside an echo statement Thumbnail Images: t= 3 (for video) w and h specify width and height of thumbnail Remember: you have to escape \ the quotation marks if used inside an echo statement

© Anselm Spoerri Access Gigapan with Specific ID Database Table: $db_table = 'whereru_gigapan'; // description in Sakai Resources SQL Query to access record for specific id: $query = "SELECT * FROM $db_table WHERE id=$id";

© Anselm Spoerri Attach Hyperlink to Individual Item Attach hyperlink to thumbnail so that click loads individual view Set border of image to zero so that blue border does not show because of hyperlink URL: databaseConnect_individual_gigapan_links_spoerri.phpdatabaseConnect_individual_gigapan_links_spoerri.php To be able to supply variables via URL need start with ? for first variable and use & for subsequent variables

© Anselm Spoerri View Individual Item To display Gigapan with a specific id passed in via URL URL: databaseConnect_individual_gigapan_spoerri.php ?id=50databaseConnect_individual_gigapan_spoerri.php ?id=50 Use extract($_GET) to assign id to a php variable So that extracted variables don't conflict with ones that you have already defined use parameter in extract function, like this: extract($_GET, EXTR_PREFIX_ALL, 'fromget'); You can access the passed-in id via the $fromget_id variable SQL query to access record for specific id $query = "SELECT * FROM $db_table WHERE id=$fromget_id";