$this->_sqlSplit =
preg_split('/(\?|\:[a-zA-Z0-9_]+)/',
$sql, -1, PREG_SPLIT_DELIM_CAPTURE|PREG_SPLIT_NO_EMPTY
);
// map params
$this->_sqlParam = array
();
foreach ($this->_sqlSplit
as $key =>
$val) { if ($val == '?'
) { if ($this->_adapter->
supportsParameters('positional'
) === false
) { /**
* @see Zend_Db_Statement_Exception
*/
throw new Zend_Db_Statement_Exception("Invalid bind-variable position '
$val'"
);
} } else if ($val[0
] == ':'
) { if ($this->_adapter->
supportsParameters('named'
) === false
) { /**
* @see Zend_Db_Statement_Exception
*/
throw new Zend_Db_Statement_Exception("Invalid bind-variable name '
$val'"
);
} } $this->_sqlParam
[] =
$val;
}