MySQL
  Home arrow MySQL arrow The Three Most Important MySQL Queries
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid  
Request Media Kit
Contact Us  
Site Map  
Privacy Policy  
Support  
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
Google.com  
MYSQL

The Three Most Important MySQL Queries
By: Codex-M
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 12
    2009-07-06


    Table of Contents:
  • The Three Most Important MySQL Queries
  • The INSERT MySQL Query Command
  • The SELECT MySQL Query Command
  • The UPDATE MySQL Query Command

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    The Three Most Important MySQL Queries
    ( Page 1 of 4 )

    Doing PHP queries to a MySQL database is one of the most important processes in any web application. This is where data is being fetched from or inserted into the database. If you are a beginning PHP web developer, then learning the most important MySQL queries is essential to your success in dealing with dynamic websites.

    You can see dynamic websites almost everywhere on the net. Popular software packages, whether for blogging (like WordPress or Drupal) or e-commerce (such as osCommerce) are configured to be dynamic in nature. Dynamic websites rely on MySQL databases to fetch and insert data coming from and going to the browser.

    If you are beginner, understanding the simple diagram below helps you to understand the role of MySQL in today's dynamic websites as compared to the traditional static websites.

    In a simple static websites (popular in the old days of the Internet), you would see the following flow of events:

    Client browser request for information from the server -> Server returns HTML code to the browser -> Browser displays the HTML, which becomes a web page.

    Now, in modern dynamic websites:

    The client browser requests a web page, and when the server receives the request, the web template (those files with the extension *.php) executes the PHP scripts that involve fetching information (involving queries) from MySQL (such as your name, password, content, or anything else). The information will then be added to the web template, and then return to the browser as HTML. When you view the source code, you cannot see the PHP scripts any longer, because they have already been executed in the server.

    With dynamic websites, you can create a thousand URLs with only one server PHP template stored. But with static websites, you need to store 1000 HTML files in your server to create 1000 URLs (which is very difficult to manage or update). Do you see the difference?

    If you know the most important MySQL queries, it will then be very easy to communicate with the database, thus enabling you to create complex PHP web applications. This will save you time and make your website as efficient as possible. In this tutorial, we will illustrate PHP scripts that will query a MySQL database using the basic INSERT, SELECT, and UPDATE commands.



     
     
    >>> More MySQL Articles          >>> More By Codex-M
     

       

    MYSQL ARTICLES

    - MySQL Security Tips
    - Designing a MySQL Database: Tips and Techniq...
    - The Three Most Important MySQL Queries
    - Null and Empty Strings
    - MySQL Server Tuning Tips and Tricks
    - MySQL Query Optimizations and Schema Design
    - MySQL Benchmarking Tools and Utilities
    - MySQL Benchmarking Concepts and Strategies
    - Take Some Load off MySQL with MemCached
    - MySQL Table Prefix Changer Tool in PHP
    - Using the SIGNAL Statement for Error Handling
    - Error Handling Examples
    - Error Handling
    - Completing a Search Engine with MySQL and PH...
    - Paginating Result Sets for a Search Engine B...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek