Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
描述预准备语句的绑定参数。
sqlany_describe_bind_param ( $stmt, $index )
$stmt 使用 sqlany_prepare 成功预准备的语句。
$index 参数的索引。该数字必须在 0 到 sqlany_num_params() - 1 之间。
返回 2 个元素的数组,其中第一个参数中 1 表示成功,0 表示失败;第二个是描述性参数。
此函数允许调用者确定有关预准备语句参数的信息。预准备语句(存储过程或 DML)的类型确定所提供的信息量。始终会提供参数的方向(输入、输出或输入-输出)。
stmt = api.sqlany_prepare(conn, "UPDATE Contacts SET Contacts.ID = Contacts.ID + 1000 WHERE Contacts.ID >= ?" ) rc, param = api.sqlany_describe_bind_param( stmt, 0 ) print "Param name = ", param.get_name(), "\n" print "Param dir = ", param.get_direction(), "\n" param.set_value(50) rc = api.sqlany_bind_param( stmt, 0, param )