XtGem Forum catalog
Eaglenet logo
24/7 updates on happenings in africa
*AH-SID 2015-07-05 00:18
I want to make blog in a hosting which support PHP. But I don't want to make blog by install blog CMS. So, please tell to me to know the basic in manage database PHP MySQL.

How to make Database Table, Insert - Select - Edit - Delete some data of database and another basic in manage database PHP MySQL.
    ·
  • rated(0)
*LORDEAGLE said to AH-SID 0n 2015-07-05 04:25
Never used MySQL before? Start here! This tutorial walks you through the very basics of MySQL and SQL databases. Learn how to install MySQL, how to issue commands, and how to create and use databases.
    ·
  • rated(0)
*LORDEAGLE 2015-07-05 04:26
A database is an essential part of most websites and blogs, but setting up and using a database can be a daunting task for the beginner web developer.
In this tutorial you'll learn — in simple terms — how to install, set up, and use a MySQL database on your computer. This will give you a good grounding in MySQL that you'll find useful when you start developing database-driven websites using PHP, Ruby, or your language of choice.
You'll explore the following areas in this tutorial:
*.The concept of a database, and why databases are useful
*.The advantages of using MySQLto manage your databases
*.How to install MySQLon your computer
*.Using the MySQL Monitor programto send commands to your MySQL server
*.How tocreate a database and table
*.SQL (Structured Query Language), and what it's used for
*.Adding recordsto a table, andretrieving recordsfrom a table
Ready to start exploring MySQL? Let's go!
    ·
  • rated(0)
*LORDEAGLE 2015-07-05 04:28
img
What is a database?
Adatabaseis a structured collection of data. Here are some typical examples of databases:
*.An online store databasethat stores products, customer details and orders
*.A database for a web forumthat stores members, forums, topics and posts
*.A database for a blog system, such as WordPress, that stores users, blog posts, categories, tags, and comments
The software that manages databases is known as adatabase management system, orDBMS. MySQL is an example of a DBMS. Rather confusingly, DBMSs are often called databases too. Strictly speaking though, the database is the data itself, while the DBMS is the software that works with the database.
There are many different ways to organize data in a database, known as database models. One of the most popular is the relational model, which is what MySQL uses (along with PostgreSQL, Oracle, Microsoft SQL Server, and other common systems). Consequently, MySQL is known as arelational database management system, or RDBMS.
The following diagram shows how a database, the DBMS, and your website's code interact with each other.
    ·
  • rated(0)
*LORDEAGLE 2015-07-05 04:30
A database (left) is a collection of related data, managed by a DBMS such as MySQL (centre). Web scripts (right) communicate with the DBMS in order to insert, update, delete and retrieve data in the database.
Why use a database?
    ·
  • rated(0)
*LORDEAGLE 2015-07-05 04:33
If you haven't used a database for your website before, you may have stored data in text files such as comma-separated value (CSV) files. Here's an example of a CSV file:
username,password,emailAddress,firstName,lastName
"obasimichael","lordeagle4","lordeagle@ example.com","obasi","michael"
"maryjones","garden37","mary@ example.com","Mary","Jones"
While this technique is fine for simple data structures and small amounts of data, you quickly run into problems as your site grows. Searching and updating a very large text file is slow and prone to corruption. What's more, things start to get messy when you want to link records together, such as linking a customer record to the orders that the customer has made, and then linking each order record to the products that are in the order.
    ·
  • rated(0)
*LORDEAGLE 2015-07-05 04:35
Relational databases are designed to take care of all these problems. Here are some reasons to use a database instead of text files:
*.They're fast.Databases use indexes, or keys, to find records of data extremely quickly. For example, once you add a key to anemailAddressfield for member records in a database, you can retrieve a member record based on the member's email address almost instantly, no matter how many millions of members you may have in your database.
*.They're reliable.A DBMS ensures that the data in the database is read and written reliably, without corrupting the data. Many DBMSs allow you to use techniques like locking and transactions to ensure that records are inserted and updated in a predictable way.
*.They let you link records together.Relational databases let you store different types of data in groups known as tables. You can then link data together across tables. For example, you can create acustomerstable and anorderstable, then link a customer record to all the order records associated with the customer. The ability to link records across tables lets you create complex databases with lots of different types of related data.
    ·
  • rated(0)
*LORDEAGLE 2015-07-05 04:37
You now know why databases are useful, and how they can help you build complex websites and web apps. But why use MySQL in particular?
There are many great DBMSs out there, including MySQL, PostgreSQL, SQLite, Oracle, and SQL Server, and all of them can be used for most web development purposes.
That said, MySQL does have a few advantages for web developers compared to some other systems:
*.It's open source, which means it's free for anyone to use and modify.

*.It's widely available.MySQL can be installed on many different platforms, and it usually comes standard with most web hosting setups.

*.It's easy to use.Setting up and working with MySQL databases is relatively straightforward.

*.It works well with PHP.As of version 5.3, PHP has a native MySQL driverthat is tightly coupled with the PHP engine, making it a good choice for PHP coders.
Each DBMS has its own strengths and weaknesses. For example, PostgreSQL is also open source, is very stable, and has a great community behind it. SQLite is extremely fast and self-contained (and is also free), while Oracle and SQL Server have a lot of enterprise-level features that make it a good choice for large organizations.
    ·
  • rated(0)
*LORDEAGLE 2015-07-05 04:40
Installing MySQL
img

As I mentioned above, most web hosting accounts come with MySQL pre-installed. However, if you're developing websites using MySQL, you also want to have the MySQL server running on your own computer, so that you can create and test your databases and code without needing to upload files to your live server all the time.
There are two main components to MySQL:
*.The MySQL database server,mysqld.This is the MySQL DBMS that does the actual work of managing your databases. It runs all the time in the background, accepting connections from client programs, web scripts and so on.
*.Various client and utility programs.These includemysql, the command-line MySQL Monitor client that you'll use later in the tutorial to issue commands to the server. You'll also find programs likemysqladminfor administering MySQL databases, andmysqldumpfor exporting and backing up databases.
In addition, many MySQL installs include documentation, header files for developers, and the MySQL test suite.
There are many ways to install the MySQL server and associated programs. Here are three ways you can do it:
*.Using an official MySQL installation package.There are prebuilt packagesavailable for many different operating systems, including Windows, Mac OS X and Linux. The basic procedure is to download the package file, extract it, and run the installer. See the documentationfor the exact steps.
*.Using a Linux package manager.Many Linux distros come with a package manager — for example, Ubuntu includes the Ubuntu Software Centre— that makes it easy to install MySQL, along with PHP, Apache and other web development software. See your distro's documentation for details.
*.Installing an entire LAMP/WAMP/MAMP package.This is arguably the easiest way to install a complete MySQL-based development setup on your computer. These packages contain all you need to start building database-driven sites, including the Apache web server, MySQL, and PHP/Perl, hence the acronym "AMP". (The L, W and M stand for Linux, Windows and Mac OS X respectively.) Since everything's installed in one go, you'll find that Apache, MySQL and PHP/Perl all play nicely together, with little or no further configuration required.
If you want to get up and running as quickly and easily as possible, I'd personally recommend downloading and installing XAMPP. This LAMP/WAMP/MAMP package is available for Linux, Windows, Mac OS X and Solaris, and automatically installs and sets up Apache, MySQL, PHP and Perl on your computer. What's more, it's easy to uninstall everything later if you want to.
To install XAMPP:
1. Visit the XAMPP homepageand click the link for your operating system (Linux, Windows, Mac OS X or Solaris).
2.Follow the steps on the page to download, install, start, and test the XAMPP system on your computer.
Other popular packages similar to XAMPP include WampServerand EasyPHPfor Windows, and MAMPfor Mac OS X.
XAMPP makes it easy to install a complete Apache, MySQL, PHP and Perl setup on Windows, Mac and Linux.
    ·
  • rated(0)
*LORDEAGLE 2015-07-05 04:40
XAMPP makes it easy to install a complete Apache, MySQL, PHP and Perl setup on Windows, Mac and Linux.
    ·
  • rated(0)
Oniline