PHP Programming Basics Practice Test: Updating and Deleting Entries in PHP — Flashcards | PHP & Programming | FatSkills

PHP Programming Basics Practice Test: Updating and Deleting Entries in PHP — Flashcards

Fast review mode: answers are shown by default so you can skim quickly. Hide them if you want to self-test.

In PHP, the Create, Read, Update, and Delete (CRUD) operations are used to communicate with a database using Structured Query Language (SQL). The CRUD operations are:
Insert:
Inserts a record into a table
Update: Modifies an inserted table row
Delete: Deletes a record 

The steps for performing CRUD operations on a MySQL database using PHP are:
Create a connection between the database and your PHP code
Create a page to create records
Create a page to read records
Create a page to update records
Create a page to delete records 

Examples of deleting data from a table in PHP:
Procedural:
`$servername = `localhost''; `$username = `username''; `$password = `password''; `$dbname = `myDB'';
// Create connection `* // Check connection ` if (! $conn) ( `die(`Connection failed: '' . mysqli_connect_error());
// sql to delete a record ` 

Examples of the basic syntax for multi-record insertion:
`INSERT INTO my_table(column_name, column_name_2) VALUES ('value', 'value2'), ('value3', 'value4'), ('value5', ** To remove multiple rows at once, you can manipulate the selection criteria specified in the WHERE clause
DELETE FROM employee WHERE employee_id in (3,4);

Related Test: PHP Programming Basics Practice Test: Working With Databases in PHP

1 of 10 Ready
Once your application can generate administrative links, you need to load those links into _________
index.php
Shortcuts
Prev Space Show / hide Next
Turn this into a study set.
Sign in with Google to save tricky questions to your reminder list and resume on any device.
Sign in with Google Free • no extra password