SQL PHP HTML ASP JavaScript articles and free scripts to download
PHP

Starting with PHP & MySQL

PHP and MySQL are part of famous LAMP ( Linux , Apache, MySQL, PHP) combination and is most popular database in use for the web applications. PHP and MySQL gets integrated easily in any platformes. Scripts developed in PHP using Window platform works perfectly in when used in Linux environment. Many PHP MySQL developers work in Windows platform and run the script in Linux web server.

PHP: It is the script or language

PHP is used to connect to database, display the results or manage the records of the database. PHP is the server side scripting language and to know more about it and how PHP work you can vist our PHP introduction page. To get the full detail of PHP components working in the server you can use PHP command phpinfo.  PHP works equally well with MSSQL, Oracle and other databases available. We will discuss more on MySQL here.
Client connected to web server and Database via Internet

MySQL: It is the database

It stores tables, support queries to manage its data. We keep all our records in MySQL database. MySQL can be downloaded from www.mysql.org.  MySQL database  is very powerful and can be used in real word demanding projects. Different version of MySQL is available for different platforms.

MySQL once installed runs as a server in the local machine or in any remote server. User can connect to the local or remote MySQL server by using the server name or IP address based on the privelage they have. Once connected users can manupulate the MySQL database by using different PHP commands. You will learn many such PHP commands here.

Installing both depends on the platform you use. In windows system like any other software you can install both. Read the PHP section on how to install

Managing MySQL

After installing MySQL and your localhost, you can manage MySQL database by using PHPmyAdmin . Once our setup is ready we will try to run our SQL from PHP scripts

Executing query in PHP

We will learn how to write a query and using PHP function how to execute the query. This process will ensure that all data connections are established and from PHP script we can manage the data stored in MySQL.

Displaying Records

We will start with the most simple job of displaying records or data from MySQL table by using PHP. There are several ways to do this and as per our requirement we can collect single or multiple records from the tables to display.

Displaying records with Edit option

Each record will have one Edit button for the user to update data

Showing more details of record on click ( expand ) by user

We can display minimal information line name or id to the user and on click we can further expand it to display full details of the record.

Paging of records

When we have more records to display we cant show all at same time. We can display fixed numbers or a set of records per page by giving navigation to previous or next set of records. We call it paging.

PDO: Portable Data Object

We can use PDO to connect to various data sources and we will discuss more on MySQL connection here

Be the first to post comment on this article :


Google+
Post Comment This is for short comments only. Use the forum for more discussions.
Name
Email( not to be displayed)Privacy Policy
1+2=This is to prevent automatic submission by spammers. Please enter the result of the sum as asked



Join Our Email List
Email:  
For Email Newsletters you can trust
HTML . MySQL. PHP. JavaScript. ASP. Photoshop. Articles. FORUM Contact us

©2000-2014 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer