You are on page 1of 20

1

ISCOMPROG2

Computer Programming 2

Yul Bryan M. Varca


2

REFRESHER
3

REFRESHER
4

REFRESHER
5

REFRESHER
6

PHP coding(30mins.)

Create a php code with inputs, that ask for three numbers and performs subtraction.
7

Solution
8

Form Validation
9

Form Validation
10

Form Validation
11

Try to code
12
My SQL

SQL commands you knew:

-“create database myDatabase;”


-“show databases;”
-“use myDatabase;”
-”create table information(id int unsigned
auto_increment primary key not null, name
varchar(30) not null, email varchar(30) not null);”
-”show tables;”
-”insert into information(name, email) values ('Juan De
la cruz','juan@gmail.com');”
-”select * from information”;
13

Create the table


1. Create a database (db_bsis)
2. Use (db_bsis)
3. Create the table below (tbl_information) and insert the
following data:
14

Updating the data


The MySQL UPDATE Statement
The UPDATE statement is used to modify the existing
records in a table
15
Updating the data
Example
16

Update your table


Update the first row, the first name, last name, adress
and city to your OWN PERSONAL DATA
17

Update your table


Update the second row to your mothers data(firstname,
lastname, address, city and age)
18
Delete data from your table
19

Delete data from your table

delete from (table_name) where id=5;


delete from (table_name) where lastname like ‘Woman’;
20

Database Connection

You might also like