Пример #1
0
 /**
  * Determines the number of rows affected by a data maniuplation query
  *
  * 0 is returned for queries that don't manipulate data.
  *
  * @return int  the number of rows.  A DB_Error object on failure.
  */
 function affectedRows()
 {
     return sqlite3_changes($this->connection);
 }
Пример #2
0
/**
 * Returns the number of matched rows in a SQL query
 *
 * @access public
 * @return int  Number of matched rows
 */
function serendipity_db_matched_rows()
{
    global $serendipity;
    // It is unknown whether sqllite returns rows MATCHED or rows UPDATED
    return sqlite3_changes($serendipity['dbConn']);
}
 function _affectedrows()
 {
     return sqlite3_changes($this->_connectionID);
     //**tochange
 }
Пример #4
0
 /**
  * perform a query on the database like query but return the affected_rows instead of result
  * give a most suitable answer on query such as INSERT OR DELETE
  * Be aware that delete without where clause can return 0 even if several rows were deleted that's a sqlite bug!
  *    i will add a workaround when i'll get some time! (use get_count before and after such query)
  * @param string $Q_str
  * @return int affected_rows
  */
 function query_affected_rows($Q_str)
 {
     if (!$this->query($Q_str)) {
         return FALSE;
     }
     return sqlite3_changes($this->db);
 }
Пример #5
0
 public function changes()
 {
     return sqlite3_changes($this->conn);
 }