|
|
|
|
|
|
| |
SQL stands for Structured Query Language.
MySQL runs on a server deamon where users on the same or even remote computers can connect.
Once connected you can select database if you have privileges to do so.
In this tutorial you will learn:
1. How to connect to MySQL.
2. Create a Table
3. Insert data in to you database.
4. Display database data in you browser.
5. Change data.
The Code:
Lets start off by connecting to MySQL: |
|
<?php
$location = "localhost";
$username = "username";
$password = "password";
$database = "database";
$conn = mysql_connect("$location","$username","$password");
if (!$conn) die ("Could not connect MySQL");
mysql_select_db($database,$conn) or die ("Could not open database");
?>
|
|
|
Read More... |
|
| |
| Beginners guide to PHP and MySQL - Creating a simple guest book Categories : Beginner Guides, To PHP, To MySQL, PHP, MySQL | | | How To add paging (Pagination) with PHP and MySQL Categories : PHP, Beginner Guides, Databases, MySQL, HTML and PHP | | | Counting - Creating a simple counter Categories : PHP, MySQL, Beginner Guides, To PHP, To MySQL | | | Beginners guide to PHP and MySQL Categories : PHP, Beginner Guides, Databases, MySQL, Installation | | | Counting - Creating a GIF based counter using PHP and MySQL Categories : Beginner Guides, PHP, To PHP, To MySQL, MySQL | | | Counting - Creating a more sophisticated GIF based counter using PHP and MySQL Categories : Beginner Guides, MySQL, PHP, To PHP, To MySQL | | | PHP, MySQL and Authentication 101 Categories : PHP, Databases, MySQL, Authentication | | | Building A Persistent Shopping Cart With PHP and MySQL Categories : PHP, MySQL, Databases, Ecommerce | | | Speaking SQL part 2 Categories : General SQL, Databases, MySQL | | | How Logs Work On MySQL With InnoDB Tables Categories : Databases, MySQL, InnoDB | | | Managing Foreign Key Relationships In MySQL Using SQLyog Categories : Databases, MySQL, SQLyog | | | Creating Users and Setting Permissions in MySQL Categories : Databases, MySQL | | | Miles To Go Before I Sleep... Categories : PHP, Calendar, Databases, MySQL | | | Alternating row colors with PHP and mySQL Categories : PHP, Databases, MySQL, HTML and PHP | | | Multicolumn Output from a Database with PHP Categories : PHP, Databases, HTML and PHP, MySQL | |
| |
|
|