Database Example: DELETE and INSERTStatements in HTML/PHP

Preface

Examples for this HTML/PHP script are taken from accepted papers from SIGCSE 2008. In a few cases, the status of a paper is listed here as "submitted" rather than "accepted" to provide a better example. Independent of the information reported here, all papers were accepted and are included in the SIGCSE 2008 Proceedings, available through the ACM Digital Library.

Connect to the Database

logging into MySQL database: done
selecting database: done

Remove Records from Paper Table

defining query: DELETE from confPaper
executing query: done

Insert New Records into Paper Table

defining query for papers 1, 2, 3: INSERT INTO confPaper values (1, "Teaching Students to Think Nondeterministically", "accepted"), (2, "A Conceptual Approach to Teaching Induction for Computer Science", "accepted"), (3, "Incorporating Transformations into JFLAP for Enhanced Understanding of Automata", "submitted");
executing query: done
defining query for paper 4: INSERT INTO confPaper set paperID=4, title="Bantam: A Customizable, Java-Based, Classroom Compiler", status="submitted";
executing query: done
defining query for paper 5: INSERT INTO confPaper set paperID=5, title="Language Engineering in The Context of A Popular, Inexpensive Robot Platform", status="accepted";
executing query: done
defining query for paper 6: INSERT INTO confPaper set paperID=6, title="Language Design and Implementation using Ruby and the Interpreter Pattern", status="accepted";
executing query: done

Wrap Up

closing database: done