mixed CDatabase::QueryBindSelect( string sql, array binds, bool ignore_errors=false, string error_position="" )
The method QueryBindSelect executes a "SELECT" SQL query that require variable binding.
Note
This method is for use with the Oracle version only!
Parameter | Description |
---|---|
sql | SQL query. |
binds | Array of fields BLOB, CLOB, LONG etc. in the format array("field name" => "value" [, ...]). |
ignore_errors | Specifies to ignore errors. If set to true, the method returns false on failure. If set to false, the method breaks the page execution. Optional; false by default. |
error_position | String indicating the method call position in the code (e.g. __LINE__ ). If an SQL query fails and the file /bitrix/php_interface/dbconn.php has the variable $DBDebug=true;, the error_position and the failure SQL
query are printed. |
The method returns an instance of CDBResult on success.
If an error occurs and the ignore_errors parameter is true, the function returns false. If the ignore_errors parameter is false, the method breaks the page execution, having the following operations performed beforehand.
<? $strSql = " SELECT * FROM my_table WHERE :url like '/en/index.php%' "; $arrBind = array("url" => $APPLICATION->GetCurUri()); $rs = $DB->QueryBindSelect($strSql, $arrBind, false, "F: ".__FILE__." L: ".__LINE__); ?>
© 2001-2005 Bitrix | Bitrix Site Manager - Content Management & Portal Solutions |