roundcubemail/program/lib/Roundcube/rcube_contacts.php
function delete_all($with_groups = false)
    {
        $this->cache = null;

        $now = $this->db->now();

        $this->db->query("UPDATE " . $this->db->table_name($this->db_name, true)
            . " SET `del` = 1, `changed` = $now"
            . " WHERE `user_id` = ?", $this->user_id);

        $count = $this->db->affected_rows();

        if ($with_groups) {
            $this->db->query("UPDATE " . $this->db->table_name($this->db_groups, true)
                . " SET `del` = 1, `changed` = $now"
                . " WHERE `user_id` = ?", $this->user_id);

            $count += $this->db->affected_rows();
        }

        return $count;
    }
function delete_all($with_groups = false)
    {
        $this->cache = null;

        $now = $this->db->now();

        $this->db->query("UPDATE " . $this->db->table_name($this->db_name, true)
            . " SET `del` = 1, `changed` = $now"
            . " WHERE `user_id` = ?", $this->user_id);

        $count = $this->db->affected_rows();

        if ($with_groups) {
            $this->db->query("UPDATE " . $this->db->table_name($this->db_groups, true)
                . " SET `del` = 1, `changed` = $now"
                . " WHERE `user_id` = ?", $this->user_id);

            $count += $this->db->affected_rows();
        }

        return $count;
    }
function delete_all ( $ with_groups = false ) { $ this -> cache = null ; $ now = $ this -> db -> now ( ) ; $ this -> db -> query ( "UPDATE " . $ this -> db -> table_name ( $ this -> db_name , true ) . " SET `del` = 1, `changed` = $now" . " WHERE `user_id` = ?" , $ this -> user_id ) ; $ count = $ this -> db -> affected_rows ( ) ; if ( $ with_groups ) { $ this -> db -> query ( "UPDATE " . $ this -> db -> table_name ( $ this -> db_groups , true ) . " SET `del` = 1, `changed` = $now" . " WHERE `user_id` = ?" , $ this -> user_id ) ; $ count += $ this -> db -> affected_rows ( ) ; } return $ count ; }
Remove all records from the database

@param bool $with_groups Remove also groups

@return int Number of removed records
Remove all records from the database