SwatDB/SwatDB.php
public static function implodeSelection(
        MDB2_Driver_Common $db,
        SwatViewSelection $selection,
        $type = 'integer'
    ) {
        $quoted_ids = array();
        foreach ($selection as $id) {
            $quoted_ids[] = $db->quote($id, $type);
        }

        return implode(',', $quoted_ids);
    }
public static function implodeSelection(
        MDB2_Driver_Common $db,
        SwatViewSelection $selection,
        $type = 'integer'
    ) {
        $quoted_ids = array();
        foreach ($selection as $id) {
            $quoted_ids[] = $db->quote($id, $type);
        }

        return implode(',', $quoted_ids);
    }
public static function implodeSelection ( MDB2_Driver_Common $ db , SwatViewSelection $ selection , $ type = 'integer' ) { $ quoted_ids = array ( ) ; foreach ( $ selection as $ id ) { $ quoted_ids [ ] = $ db -> quote ( $ id , $ type ) ; } return implode ( ',' , $ quoted_ids ) ; }
Implodes a view selection object

Each item in the view is quoted using the specified type.

@param MDB2_Driver_Common $db the database connection to use to implode
the view.
@param SwatViewSelection $selection the selection to implode.
@param string $type optional. The datatype to use. Must be a valid MDB2
datatype. If unspecified, 'integer' is used.

@return string the imploded view ready for inclusion in an SQL statement.
Implodes a view selection object