Category: Accessing MySQL Using PHP

Accessing MySQL Using PHP

concat function mysql

concat function mysql

Returns the string that results from concatenating the arguments. May have one or more arguments. See the following example : Basic table structure : Appending arguments at start of string : Appending arguments at...

Querying the Database

Querying the Database

Next, the code returns to the familiar territory of previous example where, in the following four lines of code, a query is sent to MySQL asking to see all the records in the classics...

Deleting a Record

Deleting a Record

Having loaded up the various possible variables that could have been posted with any values that were passed, the program then checks whether the variable $_POST[‘delete’] has a value. If so, the user has...

The $_POST Array

The $_POST Array

We mentioned in an earlier topics that a browser sends user input through either a GET request or a POST request. The POST request is usually preferred, and we use it here. The web...

Closing database connection

Closing database connection

When you have finished using a database, you should close the connection. This is done by issuing the command : All database connections are automatically closed when PHP exits, so it doesn’t matter that...

Fetching a row

Fetching a row

It was important to show how you can fetch a single cell of data from MySQL, but now let’s look at a much more efficient method. So, replace the for loop of query.php with...