PHP
  Home arrow PHP arrow Page 2 - Ordering Columns in DDBB Search Results
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? 
PHP

Ordering Columns in DDBB Search Results
By: Alvaro Calleja
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 13
    2004-12-06


    Table of Contents:
  • Ordering Columns in DDBB Search Results
  • The Test Scenario
  • The Basic Code
  • We Love InnerHTML!
  • I Need More!
  • The Final Words

  • 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


    Ordering Columns in DDBB Search Results - The Test Scenario
    ( Page 2 of 6 )

    First, we'll create a products table in our MySQL test database and insert some records on it:

    CREATE TABLE products (

      ID smallint(5) unsigned NOT NULL auto_increment,

      NAME varchar(125) NOT NULL default '',

      PRICE float(8,2) NOT NULL default '0.00',

      CODE varchar(10) NOT NULL default '',

      WEIGHT smallint(5) unsigned NOT NULL default '0',

      PRIMARY KEY (ID)

      ) TYPE=MyISAM;


    INSERT INTO products VALUES (1, 'Absolute Delight', '2.20', '59', 50);

      INSERT INTO products VALUES (2, 'Aqua Mirabilis', '2.35', '114', 15);

      INSERT INTO products VALUES (3, 'Back For Breakfast', '8.30', '1409', 500);

      INSERT INTO products VALUES (4, 'Breeze on a Sea Air', '5.95', '223', 75);

      INSERT INTO products VALUES (5, 'Figs and Leaves', '3.90', '22819', 100);

      INSERT INTO products VALUES (6, 'I love Juicy', '5.95', '2006', 250);

      INSERT INTO products VALUES (7, 'Ocean Salt', '9.75', '2128', 150);

      INSERT INTO products VALUES (8, 'Serenity', '49.95', '2083', 350);

      INSERT INTO products VALUES (9, 'Tisty Tosty', '2.35', '5', 60);

      INSERT INTO products VALUES (10, 'Waving Not Drowning', '1.95', '15', 40);

    If nothing went wrong we should have our products table with 10 records. We are now ready to jump into the actual code!



     
     
    >>> More PHP Articles          >>> More By Alvaro Calleja
     

       

    PHP ARTICLES

    - Using Directory Iterators to Build Loader Ap...
    - Using the spl_autoload() Functions to Build ...
    - Working Out of the Object Context to Build L...
    - Using the _autoload() Magic Function to Buil...
    - The Destruct Magic Function in PHP 5
    - The Autoload Magic Function in PHP 5
    - Developing a Recursive Loading Class for Loa...
    - The Sleep and Wakeup Magic Functions in PHP 5
    - Using the Clone Magic Function in PHP 5
    - Including Files Recursively with Loader Appl...
    - The Call Magic Function in PHP 5
    - Designing a Captcha System with PHP and MySQL
    - Using Static Methods to Build Loader Apps in...
    - The Isset and Unset Magic Functions in PHP 5
    - Advanced PHP Form Input Validation to Check ...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
    Stay green...Green IT