/** * Performs an instant INSERT, returning the statement. * * @param string $tableName The table name. * @param array $data A one or two-dimensional array. * 1D: * an associative array of keys as column names and values * as their values. This inserts one row. * 2D numeric: * A numeric array where each value is an associative array * with column-value pairs. Each outer, numeric value represents * a row of data. * 2D associative: * An associative array where the keys are the columns, the * values are numerical arrays, where each value represents the * value for the new row of that key. * * @return AMysql_Statement **/ public function ins($tableName, array $data) { $stmt = new AMysql_Statement($this); $stmt->insert($tableName, $data); $stmt->execute(); return $stmt; }