PHP-language, database- programming Teppo Räisänen Oulu University of Applied Sciences School of Business and Information Management.

Slides:



Advertisements
Similar presentations
OULU ADVANCED RESEARCH ON SOFTWARE AND INFORMATION SYSTEMS Teppo Räisänen | Oulu University of Applied Sciences Facebook API Teppo Räisänen
Advertisements

PHP and MySQL Database. Connecting to MySQL Note: you need to make sure that you have MySQL software properly installed on your computer before you attempt.
Murach’s Java SE 6, C21© 2007, Mike Murach & Associates, Inc.Slide 1.
MySQL-Database Teppo Räisänen Oulu University of Applied Sciences School of Business and Information Management.
Facebook Apps Teppo Räisänen. Facebook apps Facebook apps are normal Web pages – They are run inside Facebook so they can take advantage of Facebooks.
DAT702.  Standard Query Language  Ability to access and manipulate databases ◦ Retrieve data ◦ Insert, delete, update records ◦ Create and set permissions.
Sql Server Advanced Features MIS 424 Professor Sandvig.
dcDB Stored Procedures: An Overview
© Yanbu University College YANBU UNIVERSITY COLLEGE Management Science Department © Yanbu University College Module 6:WEB SERVER AND SERVER SIDE SCRPTING,
CSCI 6962: Server-side Design and Programming
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.
True or False? Programming languages can be used to update databases and communicate with other systems. True.
1 PHP and MySQL. 2 Topics  Querying Data with PHP  User-Driven Querying  Writing Data with PHP and MySQL PHP and MySQL.
Python MySQL Database Access
Web Services Week 8 Aims: –Using web services as front ends to databases Objectives: –Review of relational databases –Connecting to and querying databases.
Eurotrace Hands-On The Eurotrace File System. 2 The Eurotrace file system Under MS ACCESS EUROTRACE generates several different files when you create.
Form and Graphical User Interfaces. Lesson plan More about queries More about entering data into a table Form.
Chapter 6 PHP Interacts with Mysql Database. Introduction In PHP, there is no consolidated interface. Instead, a set of library functions are provided.
MySQL Databases & PHP Integration Using PHP to write data to, and retrieve data from, a MySQL database.
Polling System Part 1 Creating PHP & MySQL Files CIS 254.
1. Connecting database from PHP 2. Sending query 3. Fetching data 4. Persistent connections 5. Best practices.
MySQL Database Connection
CSCI 6962: Server-side Design and Programming Database Manipulation in ASP.
Advanced SQL: Cursors & Stored Procedures
MySQL Database Management Systems Universitas Muhammadiyah Surakarta Yogiek Indra Kurniawan.
Login to a Database (from a Webpage), Inserting data into a database from a form, getting data from database and display on Webpage Done by: Mashail Alsolamy.
HTML Form Teppo Räisänen LIIKE/OAMK Basic Structure of a HTML Form The element defining a form is ’form’ Form’s most important attributes are The.
PHP Database Processing CIS 1715 Web Technologies.
For each customer interface record, a new instance of Workflow main process is kicked off, as below Click to proceed…………
Chapter 9 The Microsoft Access 2007 Window © 2007 Lawrenceville Press Slide 1.
PHP-language, conditional statements Teppo Räisänen Principal Lecturer Oulu University of Applied Sciences School of Business and Information Management.
Web Server Administration Chapter 7 Installing and Testing a Programming Environment.
DATABASE CONNECTIVITY TO MYSQL. Introduction =>A real life application needs to manipulate data stored in a Database. =>A database is a collection of.
Chapter 8 Manipulating MySQL Databases with PHP PHP Programming with MySQL 2 nd Edition.
PHP-language Variables, assingment and arithmetic operations Teppo Räisänen Principal Lecturer Oulu University of Applied Sciences School of Business and.
Windows 7 WampServer 2.1 MySQL PHP 5.3 Script Apache Server User Record or Select Media Upload to Internet Return URL Forward URL Create.
PHP-language, sessions Teppo Räisänen Principal Lecturer Oulu University of Applied Sciences School of Business and Information Management
Form and Graphical User Interfaces. Lesson plan More about queries More about entering data into a table Form.
PHP-language, loops Teppo Räisänen Principal Lecturer Oulu University of Applied Sciences School of Business and Information Management
Setting up a Development Environment. What you need Webserver (Apache) Database (MySQL) PHP All in Uniserver (google “uniserver”) Download the windows.
MySQL API( c ) & SQL2 강동훈.
PHP AND SQL SERVER: CONNECTION IST 210: Organization of Data IST210 1.
Presented by: K.AMARNATH Ht.no:10841f0045 Guided by: T.Suneetha.
SQL Injection Attacks.
SELECT, IMPLEMENT & USE TODAY’S ADVANCED BUSINESS SYSTEMS
Y.-H. Chen International College Ming-Chuan University Fall, 2004
Session 4 PHP & MySQL.
Introduction to Web programming
Pengantar Keamanan Informasi
Maintain to RDBMS Interaction
Library Reserve System
Fix Windows Update Error 80072ee2 Call
Intro To Design 1 Elementary School Library: User Sub-System Class Diagrams Software Engineering CSCI-3321 Dr. Tom Hicks Computer Science Department.
PHP-language, database-programming
ISC440: Web Programming 2 Server-side Scripting PHP 3
SQL Standard Query Language Good for manipulating a Database
Preparation for Entry into .NET Bridging Program (Databases)
Insert, Update, Delete Manipulating Data.
The Basics of Data Manipulation
Style guidelines Teppo Räisänen School of Information and Management
Web Programming Language
CS122B: Projects in Databases and Web Applications Winter 2018
Access: Access Basics Participation Project
CS122B: Projects in Databases and Web Applications Spring 2018
PHP AND MYSQL.
Updating Databases With Open SQL
Introduction to Web programming
CS122B: Projects in Databases and Web Applications Winter 2019
Updating Databases With Open SQL
Presentation transcript:

PHP-language, database- programming Teppo Räisänen Oulu University of Applied Sciences School of Business and Information Management

Idea of database programming End users do not use database from management console using SQL-statements Create UI (web-page, windows form, etc.) for end user and permorm database manipulation in application code (e. g. in PHP-script)

Database programming Database-driver Database-programming API (Application programming interface) Application

Basic steps of database programming 1.Open connection to database-server and Select database 2.Manipulate data 3.Close connection

Example: Read data from database

mysql_fetch_row Structure of the table in database Data (records) of the table in database mysql_fetch_row read one record at time and the return value is array containing information of all fields

Example: Insert data into database save.php newMessage.html

Opening connection Connection to database server must be opened before manipulating data Check always for error when opening database connections

Select database to use Servers may have several different databases

Manipulate data Reading information – mysql_query containing select sql-statement – mysql_fetch_row inside while loop Inserting, updating and deleting – mysql_query containing sql-statement that manipulates data

Close connection Connection to database (server) must be always closed after manipulatin data Open connections consumes resources from server