kohana 3 :: multi insert



$query = DB::insert('tablename', array('column1', 'column2','column3'));
foreach ($data as $d) {
    $query->values($d);
}
try {
    $result = $query->execute();
} catch ( Database_Exception $e ) {   
        echo $e->getMessage();
}

0 comments:

Post a Comment