fix(guide): simplify directory structure

This commit is contained in:
Mrugesh Mohapatra
2018-10-16 21:26:13 +05:30
parent f989c28c52
commit da0df12ab7
35752 changed files with 0 additions and 317652 deletions

View File

@ -0,0 +1,22 @@
---
title: Working With Databases
---
## What options are available for PHP to connect to a database?
PHP can connect to a variety of different databases including MongoDB, MsSQL and MySQL.
Both PHP and MySQL are very popular and provide an easy, free and open source websites
to be created and are often found together to produce websites of all types.
Both PHP and MySQL can scale to support large numbers of users.
PHP even supports more than one way to deal with connections to MySQL including MySQLi Procedural,
PHP Data Objects (PDO) and MySQLi Object Orientated along with the now deprecated MySQL Connect.
With PHP there are many features built into the core functionality of the language that make links to a
database simple and easy.
Some Examples from Mysqli are-
<?php
$con=mysqli_connect("localhost","root","","db_name") or die("Invalid User or Password...cannot connect");
?>
here we are connecting to a database on the phpmyadmin structure with no password and database name-db_name

View File

@ -0,0 +1,26 @@
---
title: MySQLi
---
## MySQLi
This is a stub. <a href='https://github.com/freecodecamp/guides/tree/master/src/pages/php/working-with-databases/mysqli/index.md' target='_blank' rel='nofollow'>Help our community expand it</a>.
<a href='https://github.com/freecodecamp/guides/blob/master/README.md' target='_blank' rel='nofollow'>This quick style guide will help ensure your pull request gets accepted</a>.
<!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
MYSQLi functions allow access to the database.
MYSQLi is an improved version of MYSQL
#### Some Important MYSQLi functions and their uses:
mysqli_connect() ==> Opens a new connection to the MySQL server
mysqli_query() ==> Performs a query against the database
mysqli_error() ==> Returns the last error description for the most recent function call
mysqli_close() ==> Closes a previously opened database connection
mysqli_connect_error() ==> Returns the error description from the last connection error
mysqli_select_db() ==> Changes the default database for the connection
mysqli_fetch_assoc() ==> Fetches a result row as an associative array
#### More Information:
<!-- Please add any articles you think might be helpful to read before writing the article -->
<a href="https://www.w3schools.com/php/php_ref_mysqli.asp">Click here</a> For more information about MYSQLi