Database Example 1: Select Record
- The code with highlighting
- The code as a text file -- IE users: right click and save to view
- Build the response page:
- Head of the response page (myselect.head) -- IE users: right click and save to view
- Body of the response page (myselect.body) -- IE users: right click and save to view
- Foot of the response page (myselect.foot) -- IE users: right click and save to view
SQL file (class_select.sql)
- 1
- SELECT Student_id, Name, Score FROM example WHERE Name='}}Name{{';
|
Database Example
2: Insert Record
- The code
- The code as a text file -- IE users: right click and save to view
- SQL file (class_insert.sql)
- 1
- INSERT INTO example (Student_id, Name, Score) VALUES ('}}REQId{{', '}}Name{{', '}}Score{{');
|
Database Example 3: Delete Example
- The code with highlighting
- The code as a text file -- IE users: right click and save to view
- Build the response page:
- Head of the response page (mydelete.head) -- IE users: right click and save to view
- Body of the response page (mydelete.body) -- IE users: right click and save to view
<tr>
- <td><h4><font face="arial">}}1{{</td>
- <td><h4><font face="arial">}}2{{</td>
- <td><h4><font face="arial">}}3{{</td>
- <td><h4><font face="arial"><input type="hidden" name="Name" value="}}2{{"></td>
- <td><h4><font face="arial"><input type="radio" name="Score" value="}}3{{"></td>
|
</tr>
|
- Foot of the response page (mydelete.foot) -- IE users: right click and save to view
SQL file (class_select_delete.sql)
- 1
- SELECT Student_id, Name, Score FROM example WHERE Name='}}Name{{';
|
SQL file (class_delete.sql)
- 1
- DELETE FROM example WHERE Score='}}Score{{' AND Name='}}Name{{';
|
|