Tutorials Home Scripts Home

What is class query 1.0?

Example


  1. include 'class-query.php';
  2. Initialized the Query class and chain parameters.
  3. Call run(), show() or get() as the last chained function. That is, run the query, show/"echo" the query or return the query;
require 'class-query.php';
$user_id=123456;
$q=new Query;
$q->select(
             array(
                        '`user`.`user_id`',
                        '`user`.`name`',
                        '`user`.`email`'
           )
        )
        ->from('`user`')
        ->where_equal_to(
                array(
                '`user_id`'=>$user_id
                )
        )
        ->limit(1)
        ->run();
if($q){
        $user=$q->get_selected();
        echo
         'Hello '.$user['name'].',<br />'.
         'Your email is currently set to '.$user['email'].' '.
         'and your user id is '.$user['user_id'].'.<br />'.
         '';
}
else{
        echo 'Sorry, user '.$user_id.' not found.';
}

  • Download class-query
  • include 'class-query.php';
  • See examples for usage

“Subscribe and get Latest entries”

Enter your email address:

Listing Details

Listing Details

Version: 1.0
Default Language: English
Filed in: scripts home » Components » PHP Class Scripts » Databases
Date Added: February 02, 2010
Views: 169
demonstration: sorry no available demo at this time
External Download: sorry no External Download links at this time please look to our internal download below

Featured Plugins Add Plugin

No Plugins with the specified criteria were found.

Bug List Report Bug

Bug List

No bugs with the specified criteria were found.

Who uses class query? (Widgets for class query)

Who uses class query?

Comments

Comment form

No Comments!

Be the first to review this page !

Leave a Comment

Comment form