PHP-language, database-programming

Slides:



Advertisements
Similar presentations
PHP SQL. Connection code:- mysql_connect("server", "username", "password"); Connect to the Database Server with the authorised user and password. Eg $connect.
Advertisements

Murach’s Java SE 6, C21© 2007, Mike Murach & Associates, Inc.Slide 1.
Outline IS400: Development of Business Applications on the Internet Fall 2004 Instructor: Dr. Boris Jukic PHP.
Fast Track to ColdFusion 9. Getting Started with ColdFusion Understanding Dynamic Web Pages ColdFusion Benchmark Introducing the ColdFusion Language Introducing.
Website Development Working with MySQL. What you will achieve today! Connecting to mySql Creating tables in mySql Saving data on a server using mySql.
1 Foundations of Software Design Lecture 27: Java Database Programming Marti Hearst Fall 2002.
Figure 1. Hit analysis in 2002 of database-driven web applications Hits by Category in 2002 N = 73,873 Results Reporting 27% GME 26% Research 20% Bed Availability.
Sql Server Advanced Features MIS 424 Professor Sandvig.
© 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
1 Insert, Update and Delete Queries. 2 Return to you Address Book database. Insert a record.
7/8/05MySQL David Lawrence1 David Lawrence, JLab An introduction for the novice.
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.
Mark Dixon Page 1 23 – Web applications: Writing data to Databases using PhP.
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.
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.
Chapter 6 PHP Interacts with Mysql Database. Introduction In PHP, there is no consolidated interface. Instead, a set of library functions are provided.
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.
Technology & Management Club Development Software Overview.
Introduction to ADO Y.-H. Chen International College Ming-Chuan University Fall, 2004.
MySQL Database Connection
CSCI 6962: Server-side Design and Programming Database Manipulation in ASP.
MySQL Database Management Systems Universitas Muhammadiyah Surakarta Yogiek Indra Kurniawan.
Web Server Administration Chapter 7 Installing and Testing a Programming Environment.
Module Review Basic SQL commands: Create Database, Create Table, Insert and Select 2. Connect an SQL Database to PHP 3. Execute SQL Commands in.
DATABASE CONNECTIVITY TO MYSQL. Introduction =>A real life application needs to manipulate data stored in a Database. =>A database is a collection of.
NMD202 Web Scripting Week5. What we will cover today PHP & MySQL Displaying Dynamic Pages Exercises Modifying Data PHP Exercises Assignment 1.
Chapter 8 Manipulating MySQL Databases with PHP PHP Programming with MySQL 2 nd Edition.
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.
PROGRAMMING IN VISUAL BASIC.NET CREATING YOUR FIRST WEB APPLICATION Bilal Munir Mughal 1 Chapter-3.
© 2007 by Prentice Hall2-1 Introduction to Oracle 10g Chapter 2 Overview of SQL and SQL*Plus James Perry and Gerald Post.
MySQL MySQL and PHP – interacting with a database.
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 강동훈.
Presented by: K.AMARNATH Ht.no:10841f0045 Guided by: T.Suneetha.
PHP-language, database- programming Teppo Räisänen Oulu University of Applied Sciences School of Business and Information Management.
PHP-language, conditional statements
SQL Injection Attacks.
Accessing the Database Server: ODBC, OLE DB, and ADO
Development of Web Applications - Introduction
Development of Web Applications – Introduction revisited
Preparation for Entry into .NET Bridging Program (Databases)
PHP-language, loops Jouni Juntunen Oulu University of Applied Sciences
Session 4 PHP & MySQL.
Introduction to Web programming
Maintain to RDBMS Interaction
Library Reserve System
ISC440: Web Programming 2 Server-side Scripting PHP 3
Preparation for Entry into .NET Bridging Program (Databases)
Workbench Data Definition Language (DDL)
The Basics of Data Manipulation
Web Programming Language
Accessing Your MySQL Database from the Web with PHP (Ch 11)
CS122B: Projects in Databases and Web Applications Winter 2018
Introduction of Week 11 Return assignment 9-1 Collect assignment 10-1
Tutorial 6 PHP & MySQL Li Xu
CS122B: Projects in Databases and Web Applications Spring 2018
ບົດທີ 6 ການຄຸ້ມຄອງຊັບພະຍາກອນຂໍ້ມູນ (Managing Data Resource)
PHP AND MYSQL.
PHP Forms and Databases.
Database Connections.
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 Jouni Juntunen Oulu University of Applied Sciences School of Business and Management Studies

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 API (Application programming interface) Database-driver

Basic steps of database programming Open connection to database-server and Select database Manipulate data 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 newMessage.html save.php

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

Select database to use Select database to use Servers may have several different databases

Manipulate data Reading information Inserting, updating and deleting 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