InsertUpdateDeleteQueries/Data management system.ppt

GabrielleMoradaMapil 3 views 39 slides Jul 15, 2024
Slide 1
Slide 1 of 39
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39

About This Presentation

Ppt for coding course and programming subjects in connection with data manipulation such as delete, modify, insert, update, and review. This also discussed about the use of database in managing information system of a particular group of data.


Slide Content

1
Insert, Update and Delete
Queries

2
Return to you Address Book database.
Insert a record.

3
Recall that this action provides the SQL, better yet
it will provided the PHP that writes the SQL.

4
Copy the code and put it somewhere
for safe keeping

5
Saved PHP-SQL code in Notepad

6
Mark a record and click the pencil icon to
update that record.

7
Change some fields and click Go.

8
Rats. I didn’t see any SQL Update
query to copy.

9
Mark a record and click on the Delete
button

10
Copy the SQL for the DELETE, then decide
whether you want to delete this record or not.

11
Saved DELETE query

12
Start two PHP files, place a form and a table with one row
and two columns on the first page.

13
Add a list/menu and a submit button in column 1
and a radio group in column 2.

14
Corresponding code.

15
Add PHP code for putting names into
list/menu.

16
Result so far.

17
Add a second form and second table with 1
row (to start) and 3 columns

18
Corresponding code

19
After the row (</tr>) but before end of table (</table>), start
PHP code block. Make array of database filed names.

20
Write a foreach loop that iterates over the FieldArray
making a table row corresponding to each

21
Result so far.

22
Add SQL query before foreach loop,
edit middle column code.

23
Result so far

24
Add non-breaking space (&nbsp;) to middle
column

25
After non-breaking space was added to
middle column

26
Add if so no Old data is showing for
“Insert” choice

27
Problem
•The radio buttons do not hold onto the
information about what choice was clicked
before.

28
The top form’s action is the same page, so it can refer to its
own $_POST array. I add some php script in the radio button
tags to check the appropriate radio button.

29
Add if structure that “remembers” which
item from the list was selected
The extra word selectedin the option tag will
indicate which of the option should be showing.

30
Added some code so that textboxes are read only
and gray when Delete is the chosen action

31
Remembers selected person, remembers
selected action, grays out textboxes when
delete is selected action.

32
Add submit button to bottom form.

33
Show old data in textbox (as starting
point) when Update is selected action.

34
Result showing old data in textbox (as
starting point) when Update is selected.

35
Insert Hidden Fields (to hold info from top form on bottom
form so it can be passed to handler of bottom form)

36
Result of hidden fields added

37
PHP code to get values from top form
onto bottom form

38
Handler code to determine action requested
on calling page

39