[Solar-svn] Revision 2849

pmjones at solarphp.com pmjones at solarphp.com
Sun Oct 7 17:31:01 CDT 2007


updated comments


Modified: trunk/Solar/Sql/Adapter/Mssql.php
===================================================================
--- trunk/Solar/Sql/Adapter/Mssql.php	2007-10-07 22:23:26 UTC (rev 2848)
+++ trunk/Solar/Sql/Adapter/Mssql.php	2007-10-07 22:31:01 UTC (rev 2849)
@@ -298,9 +298,10 @@
      * 
      * Get the last auto-incremented insert ID from the database.
      * 
-     * @param string $name The name of the auto-increment series; optional,
-     * not normally required.
+     * @param string $table The table name on which the auto-increment occurred.
      * 
+     * @param string $col The name of the auto-increment column.
+     * 
      * @return int The last auto-increment ID value inserted to the database.
      * 
      */

Modified: trunk/Solar/Sql/Select.php
===================================================================
--- trunk/Solar/Sql/Select.php	2007-10-07 22:23:26 UTC (rev 2848)
+++ trunk/Solar/Sql/Select.php	2007-10-07 22:31:01 UTC (rev 2849)
@@ -960,42 +960,103 @@
         return $this->_sql->$fetch($this->_parts, $this->_bind);
     }
     
-    
+    /**
+     * 
+     * Fetches all rows from the database using sequential keys.
+     * 
+     * @return array
+     * 
+     */
     public function fetchAll()
     {
         return $this->fetch('all');
     }
     
+    /**
+     * 
+     * Fetches all rows from the database using associative keys (defined by
+     * the first column).
+     * 
+     * N.b.: if multiple rows have the same first column value, the last
+     * row with that value will override earlier rows.
+     * 
+     * @return array
+     * 
+     */
     public function fetchAssoc()
     {
         return $this->fetch('assoc');
     }
     
+    /**
+     * 
+     * Fetches the first column of all rows as a sequential array.
+     * 
+     * @return array
+     * 
+     */
     public function fetchCol()
     {
         return $this->fetch('col');
     }
     
+    /**
+     * 
+     * Fetches the very first value (i.e., first column of the first row).
+     * 
+     * @return mixed
+     * 
+     */
     public function fetchValue()
     {
         return $this->fetch('value');
     }
     
+    /**
+     * 
+     * Fetches an associative array of all rows as key-value pairs (first 
+     * column is the key, second column is the value).
+     * 
+     * @return array
+     * 
+     */
     public function fetchPairs()
     {
         return $this->fetch('pairs');
     }
     
+    /**
+     * 
+     * Fetches a PDOStatement result object.
+     * 
+     * @return PDOStatement
+     * 
+     */
     public function fetchPdo()
     {
         return $this->fetch('pdo');
     }
     
+    /**
+     * 
+     * Fetches one row from the database.
+     * 
+     * @return array
+     * 
+     */
     public function fetchOne()
     {
         return $this->fetch('one');
     }
     
+    /**
+     * 
+     * Builds the SQL statement and returns it as a string instead of 
+     * executing it.  Useful for debugging.
+     * 
+     * @return string
+     * 
+     */
     public function fetchSql()
     {
         return $this->fetch('sql');




More information about the Solar-svn mailing list