<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -51,6 +51,11 @@
 *  ezDB Constants
 */
 
+define('EZSQL_VERSION','2.03');
+define('OBJECT','OBJECT', true);
+define('ARRAY_A','ARRAY_A', true);
+define('ARRAY_N','ARRAY_N', true);
+
 /**
  *  Simple exception container class
  *
@@ -130,6 +135,7 @@ class ezDB_Base
 	public $cache_inserts   = false;
 	public $use_disk_cache  = false;
 	
+	protected $last_result;	
 	
 	public function __construct()
 	{
@@ -648,7 +654,8 @@ class ezDB_Base
 	 */
 	public function get_results($query=null, $output = '')
 	{
-		if($output == '') $output = $this-&gt;default_type;		
+		if($output == '') $output = $this-&gt;default_type;
+		
 		// Log how the function was called
 		$this-&gt;func_call = &quot;\$db-&gt;get_results(\&quot;$query\&quot;, $output)&quot;;
 		
@@ -657,7 +664,7 @@ class ezDB_Base
 		{
 			$this-&gt;query($query);
 		}
-		
+				
 		// Send back array of objects. Each row is an object
 		if ( $output == OBJECT )
 		{
@@ -731,7 +738,7 @@ class ezDB_Base
 	 */
 	public function store_cache($query,$is_insert)
 	{
-		if(!$this-&gt;cache_queries || $is_insert)
+		if($this-&gt;cache_queries === false || $is_insert)
 			return false;
 			
 		$result_cache = array('col_info' =&gt; $this-&gt;col_info,
@@ -773,8 +780,9 @@ class ezDB_Base
 	 */
 	public function get_cache($query)
 	{
+		if($this-&gt;cache_queries === false || $is_insert)
+			return false;
 		
-		echo $this-&gt;cache_type;
 		# Check if we want to us memcache, and whether it's available
 		if($this-&gt;cache_type == 'memcache')
 		{</diff>
      <filename>ezDB_Base.class.php</filename>
    </modified>
    <modified>
      <diff>@@ -105,7 +105,9 @@ class ezDB_mysql extends ezDB_Base
 	 */
 	public function connect($dbuser='', $dbpassword='', $dbhost='localhost')
 	{
-		if(!$this-&gt;dbh = mysql_connect($dbhost, $dbuser, $dbpassword, true))
+		$this-&gt;dbh = mysql_connect($dbhost, $dbuser, $dbpassword, true);
+	
+		if(!$this-&gt;dbh)
 		{
 			if($this-&gt;use_exceptions)
 				throw new ezDB_Error(mysql_error(), mysql_errno());
@@ -113,7 +115,6 @@ class ezDB_mysql extends ezDB_Base
 			$this-&gt;register_error(mysql_error(), mysql_errno());
 			return false;
 		}
-		
 	
 		$this-&gt;clear_errors();
 		return true;
@@ -147,7 +148,7 @@ class ezDB_mysql extends ezDB_Base
 			return false;
 		}
 
-		if(!@mysql_select_db($dbname, $this-&gt;dbh))
+		if(!mysql_select_db($dbname, $this-&gt;dbh))
 		{
 			if($this-&gt;use_exceptions)
 				throw new ezDB_Error(mysql_error(), mysql_errno());
@@ -221,7 +222,7 @@ class ezDB_mysql extends ezDB_Base
 		}
 
 		// Make sure connection is ALIVEE!
-		if (!isset($this-&gt;dbh) || !$this-&gt;dbh )
+		if (!$this-&gt;dbh )
 		{
 			if($this-&gt;use_exceptions)
 				throw new ezDB_Error(mysql_error(), mysql_errno());
@@ -231,10 +232,10 @@ class ezDB_mysql extends ezDB_Base
 		}
 
 		// Perform the query via std mysql_query function..
-		$this-&gt;result = @mysql_query($query);
+		$this-&gt;result = mysql_query($query, $this-&gt;dbh);
 
 		// If there is an error then take note of it..
-		if(!$this-&gt;result &amp;&amp; mysql_errno() != 0)
+		if(!$this-&gt;result &amp;&amp; mysql_errno($this-&gt;dbh) != 0)
 		{
 			// Something went wrong		
 			if($this-&gt;use_exceptions)		
@@ -252,12 +253,12 @@ class ezDB_mysql extends ezDB_Base
 		$is_insert = false;
 		if(preg_match(&quot;/^(insert|delete|update|replace)\s+/i&quot;,$query))
 		{
-			$this-&gt;rows_affected = @mysql_affected_rows();
+			$this-&gt;rows_affected = mysql_affected_rows($this-&gt;dbh);
 			$this-&gt;num_rows = $this-&gt;rows_affected;
 						
 			if(mysql_insert_id() &gt; 0)
 			{
-				$this-&gt;insert_id = @mysql_insert_id();
+				$this-&gt;insert_id = mysql_insert_id($this-&gt;dbh);
 				$is_insert = true;
 			}
 			
@@ -270,23 +271,23 @@ class ezDB_mysql extends ezDB_Base
 			// Take note of column info
 			$i=0;
 			
-			while ($i &lt; @mysql_num_fields($this-&gt;result))
+			while ($i &lt; mysql_num_fields($this-&gt;result))
 			{
-				$this-&gt;col_info[$i] = @mysql_fetch_field($this-&gt;result);
+				$this-&gt;col_info[$i] = mysql_fetch_field($this-&gt;result);
 				$i++;
 			}
 			
 			// Store Query Results
 			$num_rows=0;
 			
-			while($row = @mysql_fetch_object($this-&gt;result))
+			while($row = mysql_fetch_object($this-&gt;result))
 			{
 				// Store relults as an objects within main array
 				$this-&gt;last_result[$num_rows] = $row;
 				$num_rows++;
 			}
 
-			@mysql_free_result($this-&gt;result);
+			mysql_free_result($this-&gt;result);
 			
 			// Log number of rows the query returned
 			$this-&gt;rows_affected = $num_rows;</diff>
      <filename>ezDB_MySQL.class.php</filename>
    </modified>
    <modified>
      <diff>@@ -233,7 +233,7 @@ class ezDB_mysqli extends ezDB_Base
 		}
 		
 		// If there is no existing database connection then try to connect
-		if ( ! isset($this-&gt;dbh) || ! $this-&gt;dbh )
+		if ( ! $this-&gt;dbh )
 		{
 			if($this-&gt;use_exceptions)
 				throw new ezDB_Error($this-&gt;dbh-&gt;error, $this-&gt;dbh-&gt;errno);</diff>
      <filename>ezDB_MySQLi.class.php</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>38f93c5e962ff8dfee3294bdbda4e16d9533ebea</id>
    </parent>
  </parents>
  <author>
    <name>Nabeel Shahzad</name>
    <email>nabeel@myorigin=$mydomain.(none)</email>
  </author>
  <url>http://github.com/nshahzad/ezdb/commit/ed6e5cbe05e4e5a53fd167aca04620457a345917</url>
  <id>ed6e5cbe05e4e5a53fd167aca04620457a345917</id>
  <committed-date>2009-07-09T07:44:32-07:00</committed-date>
  <authored-date>2009-07-09T07:44:32-07:00</authored-date>
  <message>Fixed bug with results not showing</message>
  <tree>98e980f735de735a6c408b03f3b95446f47ce08d</tree>
  <committer>
    <name>Nabeel Shahzad</name>
    <email>nabeel@myorigin=$mydomain.(none)</email>
  </committer>
</commit>
