New Features in Version 1.1

Transaction Support for PDO

Simplified DB PDO now support transactions also. Transactions are typically implemented by "saving-up" your batch of changes to be applied all at once; this has the nice side effect of drastically improving the efficiency of those updates. In other words, transactions can make your scripts faster and potentially more robust (you still need to use them correctly to reap that benefit). When the script ends or when a connection is about to be closed, if you have an outstanding transaction, PDO will automatically roll it back. This is a safety measure to help avoid inconsistency in the cases where the script terminates unexpectedly.
Check out how it will work with Simplified DB PDO, click here.
To know more about transactions, click here
            $sdb= new SimplifiedDB(); 
			$sdb->dbConnect("localhost", "simplified_user", "_QI4^U6~V)b[", "simplified_db");
			$sdb->beginTransaction=true;
			$sdb->dbInsert("user_roles",array("role_name"=>"role_name","role_description"=>"role_description"));//insert
			$role_id=$sdb->last_insert_id;
			$sdb->dbUpdate("users",array("role_id"=>$role_id),array("userId"=>1));//then update
			$sdb->dbDelete("user_roles",array("role_name"=>"role101","role_description"=>"role2"));//then delete			
			$sdb->commitTransaction();                      
 

Reset Settings

Now you can reset all the settings for same object after each operation by just putting resetAllSettings=true, it will reset all the settings after each operations so that it will not be used in the next operation like if you had set order_by,group_by,limit for a query and you want to use this for only query for object, then you can set resetAllSettings=true, instead of setting all these option one by one.
 
         	 $sdb= new SimplifiedDB(); 
			 $sdb->dbConnect("localhost", "simplified_user", "_QI4^U6~V)b[", "simplified_db");
			 $sdb->group_by_column="role_id";
			 $sdb->order_by_column="firstName";
			 $sdb->limit_val="0,10";
             $sdb->resetAllSettings=true;
			 $result=$sdb->dbSelect("users",array("firstName","email"),array("gender"=>"male")); 
             //Now you don't to reset order_by,group_by and you can directly run another query
             $result=$sdb->dbSelect("user_roles"); 
            

Get All Table Name In A Database

To retrive all the tables in database, use $sdb->dbGetTableName(); Click here to check more about this function.
 
            $sdb= new SimplifiedDB(); 
            $sdb->dbConnect("localhost", "simplified_user", "_QI4^U6~V)b[", "simplified_db");
            $result=$sdb->dbGetTableName();

Short-hand functions for getting value of single variable(column name)

Get single value of variable(column name), based on the where condition. Click here to check more about this function.
 
			// Example 1 of getting single value of variable as string
			$sdb = new SimplifiedDB();
			$sdb->dbConnect("localhost", "root", "", "simplifieddb");			
			$role_id = $sdb->dbGetVariable("users","role_id",array("userId"=>1));
            if($role_id=="1")
				echo "You can access this page";
			else
				echo "You are not allowed access this page";
            

Short-hand functions for getting all rows from table

Select all records from the table, short-hand function for retrieving all records from table. Work same as dbselect("tablename");, it is just added as a separate function to retriev all records from table. Click here to check more about this function.
 
            // Example of getting all data from table
			$sdb = new SimplifiedDB();
			$sdb->dbConnect("localhost", "root", "", "simplifieddb");
			$result = $sdb->dbGetAll("users");
            

Get rows returned by select operation

To get rows returned by select operation, use $rows_returned; Note that, this will be available only when output mode is array. Click here to check more about this function.
 
            // Example of using $rows_returned with mysql(same way work for others also);
			$sdb = new SimplifiedDB();
			$sdb->dbConnect("localhost", "root", "", "simplifieddb");
			$result = $sdb->dbGetAll("users");
            //get no. of rows returned
            echo "No. of rows returned: ".$sdb->rows_returned;
            

Character Set is now supported

Now supports charset, you can set charset using $charset. If you don't set it then default character set will be used.
 
            // Example of using $rows_returned with mysql(same way work for others also);
			$sdb = new SimplifiedDB();
			$sdb->dbConnect("localhost", "root", "", "simplifieddb");
            $charset="utf8";//now pass any character supported in utf8 encoding
			$result = $sdb->dbInsert("user_roles",array("role_name"=>"role_name","role_description"=>"any character that support utf8"));//insert