Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
返回为指定列读取的值。
sqlany_get_column ( $stmt, $col_index )
$stmt 由 sqlany_execute 或 sqlany_execute_direct 执行的语句对象。
$col_index 要检索的列编号。列编号在 0 到 sqlany_num_cols() - 1 之间。
返回 2 个元素的数组,其中第一个参数中 1 表示成功,0 表示失败;第二个是列值。
stmt = api.sqlany_execute_direct( conn, "SELECT * FROM Employees" ) # Fetch the second row rc = api.sqlany_fetch_next( stmt ) rc, employeeID = api.sqlany_get_column( stmt, 0 ) rc, managerID = api.sqlany_get_column( stmt, 1 ) rc, surname = api.sqlany_get_column( stmt, 2 ) rc, givenName = api.sqlany_get_column( stmt, 3 ) rc, departmentID = api.sqlany_get_column( stmt, 4 ) print employeeID, ",", managerID, ",", surname, ",", givenName, ",", departmentID, "\n"