Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.1 (中文) » SQL Anywhere 服务器 - 编程 » SQL Anywhere 数据访问 API » SQL Anywhere for Ruby » SQL Anywhere Ruby API

 

sqlany_num_params

返回预期用于预准备语句的参数数目。

语法
sqlany_num_params ( $stmt )
参数
  • $stmt   成功执行 sqlany_prepare 所返回的语句对象。

返回值

返回标量值,即预准备语句中的参数数或 -1(失败时)。

另请参见
示例
stmt = api.sqlany_prepare(conn, "UPDATE Contacts
      SET Contacts.ID = Contacts.ID + 1000
      WHERE Contacts.ID >= ?" )
num_params = api.sqlany_num_params( stmt )