- MariaDB - Useful Functions
- MariaDB - Backup Loading Methods
- MariaDB - Backup Methods
- MariaDB - SQL Injection Protection
- MariaDB - Managing Duplicates
- MariaDB - Sequences
- MariaDB - Table Cloning
- MariaDB - Temporary Tables
- Indexes & Statistics Tables
- MariaDB - Alter Command
- MariaDB - Transactions
- MariaDB - Regular Expression
- MariaDB - Null Values
- MariaDB - Join
- MariaDB - Order By Clause
- MariaDB - Like Clause
- MariaDB - Delete Query
- MariaDB - Update Query
- MariaDB - Where Clause
- MariaDB - Select Query
- MariaDB - Insert Query
- MariaDB - Drop Tables
- MariaDB - Create Tables
- MariaDB - Data Types
- MariaDB - Select Database
- MariaDB - Drop Database
- MariaDB - Create Database
- MariaDB - Connection
- MariaDB - PHP Syntax
- MariaDB - Administration
- MariaDB - Installation
- MariaDB - Introduction
- MariaDB - Home
MariaDB Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
MariaDB - PHP Syntax
MariaDB partners well with a wide variety of programming languages and frameworks such as PHP, C#, JavaScript, Ruby on Rails, Django, and more. PHP remains the most popular of all available languages due to its simppcity and historical footprint. This guide will focus on PHP partnered with MariaDB.
PHP provides a selection of functions for working with the MySQL database. These functions perform tasks pke accessing it or performing operations, and they are fully compatible with MariaDB. Simply call these functions as you would call any other PHP function.
The PHP functions you will use for MariaDB conform to the following format −
mysql_function(value,value,...);
The second part of the function specifies its action. Two of the functions used in this guide are as follows −
mysqp_connect($connect); mysqp_query($connect,"SQL statement");
The following example demonstrates the general syntax of a PHP call to a MariaDB function −
<html> <head> <title>PHP and MariaDB</title> </head> <body> <?php $retval = mysql_function(value, [value,...]); if( !$retval ) { die ( "Error: Error message here" ); } // MariaDB or PHP Statements ?> </body> </html>
In the next section, we will examine essential MariaDB tasks, using PHP functions.
Advertisements