Employee Info Manager. Employee Info Employee_id First_name Last_name Email cell Apartment_id.

Slides:



Advertisements
Similar presentations
Web Database Programming Connecting Database to Web.
Advertisements

DATABASE PROGRAMMING Sections 5-7. Write a query that shows the average, maximum, and minimum salaries for all employees with jobs in the programming.
10 Copyright © Oracle Corporation, All rights reserved. Including Constraints.
8 Copyright © Oracle Corporation, All rights reserved. Manipulating Data.
Database I. Practice SQL.
These instructions will allow you to use the AKO White pages while in Outlook. Since the settings use your AKO account, it should still work once your.
© Yanbu University College YANBU UNIVERSITY COLLEGE Management Science Department © Yanbu University College Module 6:WEB SERVER AND SERVER SIDE SCRPTING,
Homework for October 2011 Nikolay Kostov Telerik Corporation
INTERNET APPLICATION DEVELOPMENT PRACTICAL ON CONNECTING TO MYSQL.
Week 7. Lecture 3 PHP Forms. PHP forms In part 2 of this course, we discussed html forms, php form is similar. Lets do a quick recap of the things we.
DATABASE DESIGN I IST 210: Organization of Data IST210 1.
SEU On-line Sales System Mark Davis Senior BS in Computer Science.
Web Scripting [PHP] CIS166AE Wednesdays 6:00pm – 9:50pm Rob Loy.
10 Copyright © 2009, Oracle. All rights reserved. Using DDL Statements to Create and Manage Tables.
1 Copyright © 2006, Oracle. All rights reserved. Using DDL Statements to Create and Manage Tables.
Copyright © 2004, Oracle. All rights reserved. Using DDL Statements to Create and Manage Tables.
10 Copyright © Oracle Corporation, All rights reserved. Including Constraints.
Intro to DatabasesClass 4 SQL REVIEW To talk to the database, you have to use SQL SQL is used by many databases, not just MySQL. SQL stands for Structured.
Multiple Table Queries (Inner Joins) Week 3. Objective –Write SELECT statements to display data from more than one table using inner joins.
Intro to LAMP Programming Presented for SAT Linux Users' Group by Dan Zollars.
Open Source Server Side Scripting ECA 236 Open Source Server Side Scripting PHP & MySQL.
Chapter 2 Views. Objectives ◦ Create simple and complex views ◦ Creating a view with a check constraint ◦ Retrieve data from views ◦ Data manipulation.
Programmatic SQL Shaista Khan CS 157B. Topic Embedded SQL statements in high-level programming languages.
SQL Basics. What is SQL? SQL stands for Structured Query Language. SQL lets you access and manipulate databases.
10 Copyright © Oracle Corporation, All rights reserved. Including Constraints.
INCLUDING CONSTRAINTS lecture5. Outlines  What are Constraints ?  Constraint Guidelines  Defining Constraint  NOT NULL constraint  Unique constraint.
SQL Jan 20,2014. DBMS Stores data as records, tables etc. Accepts data and stores that data for later use Uses query languages for searching, sorting,
Using SQL Connecting, Retrieving Data, Executing SQL Commands, … Svetlin Nakov Technical Trainer Software University
Web Scripting [PHP] CIS166AE Wednesdays 6:00pm – 9:50pm Rob Loy.
Database Programming Sections 7–Multi-row sub queries, IN, ANY, ALL, Data Manipulation Language (DML) transaction, INSERT, implicit, explicit, USER, UPDATE,
Accessing mySQL relational database. MySQL database.  Today, we will attempt and open a connection to the MySQL server.  We need to specify the database.
PHP: MySQL. PHP Connect to MySQL PHP 5 and later can work with a MySQL database using: – MySQLi extension (the "i" stands for improved) – PDO (PHP Data.
PHP Database Pemrograman Internet. PHP MySQL Database With PHP, you can connect to and manipulate databases. MySQL is the most popular database system.
CHAPTER 10 PHP MySQL Database
Understand Tables and How to Create Them Database Administration Fundamentals LESSON 2.2.
CSC 2720 Building Web Applications Accessing MySQL from PHP.
Multimedia Festival Registration. Creation of database tables Student table Project table Criteria table.
Including Constraints. What Are Constraints? Constraints enforce rules at the table level. You can use constraints to do the following: – Enforce rules.
+ Back to html / php / sql. + HTML Hello World Page Title Hello World!!
Databases Flat Files & Relational Databases. Learning Objectives Describe flat files and databases. Explain the advantages that using a relational database.
OBJECTIVES Learn how to view data using SQL and PHP Learn how to add new data using SQL and PHP PHP+SQL: View and Adding,
Simple Queries DBS301 – Week 1. Objectives Basic SELECT statement Computed columns Aliases Concatenation operator Use of DISTINCT to eliminate duplicates.
Constraints and Views Chap. 3-5 continued (7 th ed. 5-7)
Database Design I IST 210: Organization of Data IST2101.
CSED421 Database Systems Lab View. Page 2  Virtual or logical table which is defined as SELECT query with joins  Act as table but not real data, only.
Insert, update, delete TCL. Data Manipulation Language – A DML statement is executed when you: Add new rows to a table Modify existing rows in a table.
SQL SQL Ayshah I. Almugahwi Maryam J. Alkhalifa
PHP (Session 2) INFO 257 Supplement.
PHP: MySQL Lecture 14 Kanida Sinmai
CS3220 Web and Internet Programming More SQL
CS320 Web and Internet Programming SQL and MySQL
IST 210: Organization of Data
Introduction to Web programming
Manipulating Data.
Celeste Geralds Introduction to Databases
التحويل من نموذج الكيان ERD الى مخطط قواعد البيانات (نموذج علائقي)
MySQL Web Application Connecting to a MySQL database
Quiz 1 1. Given two sets S = {3, 5, 7} and T = {2, 4, 6}. List all elements of the following set: {(s, t) | (s, t)  S  T and s + t = 9} Result (3, 6)
Chapter 2 Views.
Manipulating Data.
Chapter 2 Views.
PHP: Combo box FdSc Module 109 Server side scripting and
Flat Files & Relational Databases
Using CASE Value expression
CS3220 Web and Internet Programming SQL and MySQL
CS3220 Web and Internet Programming SQL and MySQL
Introduction to Web programming
Conection
Including Constraints
Presentation transcript:

Employee Info Manager

Employee Info Employee_id First_name Last_name cell Apartment_id

Apartment Apartment_id Address City State

Department Department_id department

Employee_department Employee_id Department_id

position Position_id position

employee_position Employee_id Position_id

supervisor Supervisor_id Supervisor_first_name Supervisor_last_name Employee_id

$query = "SELECT employeeId, from employee_info"; $result if($result){ while($row = mysqli_fetch_array($result, MYSQLI_ASSOC)){ ## make row into an associatiated array. also there are MYSQLI_NUM(use index to echo) and MYSQLI_BOTH if ($row['employeeId'] == $employeeId or $row[' '] == $ ) { $error [] = "Duplicated user or name"; echo "The employeeId or is in use. "; }

if(!empty($error)){ echo 'Check your input. '; exit(); } $employeeId = mysqli_real_escape_string($dbc, trim($employeeId)); $fname = mysqli_real_escape_string($dbc, trim($fname)); ## trim() get rid of the white spaces $lname = mysqli_real_escape_string($dbc, trim($lname)); $ = mysqli_real_escape_string($dbc, trim($ )); $apartmentID = mysqli_real_escape_string($dbc, trim($apartmentID)); $q = "INSERT INTO employee_info(employee_id, first_name, last_name, , apartment_id) VALUES ('$employeeId', '$fname','$lname','$ ', '$apartmentID')"; $r if($r){ echo 'You have been successfully registered. '; echo 'Your Employee Id: ', $employeeId, ' '; echo 'Your ', $ , ' '; }else{ echo 'System error. '; echo mysqli_error($dbc), ' '; }