Handling MySQL
  • phpMyAdmin is an open source web-based application , written generally in PHP, for managing MySQL and MariaDB using a web browser.
  • By selecting the Insert option, you can insert data into the tables you have created.
  • By importing the database into MySQL, you can insert your already existing database.
  • It is recommended that the database has the extension .sql.
  • Database export is the output of the database from within phpMyAdmin.
  • The function library that PHP uses to connect to MySQL is called MySQLi.
  • MySQLi_connect_errno() returns the number of errors in case of failed execution.
  • In the database you want to connect to, you must specify the mysqli_connect() function as a parameter.
  • The execution of the query to the database is done by means of the mysqli_query() function.
  • The mysqli_close (database connection) function is used to close database connections.
PHP and databases
  • PHP provides support for Open Database Connectivity (ODBC) and thus the PHP program can access any database that supports ODBC.
  • odbc_connect(dsn/dsn-less connection string, username, password) – function used to establish the connection with the database.
  • odbc_exec(connection_id, SQL query_string) – this function is used to execute the SQL command.
  • The mysql extension, starting with PHP version 5.5.0, is considered outdated and is no longer recommended for use.
  • The representation of the data in the database is executed with the SELECT query.