}
/* }}} */
-/* {{{ proto int mysqli_fetch(object stmt)
+/* {{{ proto mixed mysqli_fetch(object stmt)
Fetch results from a prepared statement into the bound variables */
PHP_FUNCTION(mysqli_fetch)
{
if (lval != (long)lval) {
/* even though lval is declared as unsigned, the value
* may be negative. Therefor we cannot use %llu and must
- * user %lld.
+ * use %lld.
*/
sprintf((char *)&tmp, "%lld", lval);
ZVAL_STRING(stmt->result.vars[i], tmp, 1);
MYSQLI_REPORT_STMT_ERROR(stmt->stmt);
}
- RETURN_LONG(ret);
+ switch (ret) {
+ case 0:
+ RETURN_TRUE;
+ break;
+ case 1:
+ RETURN_FALSE;
+ break;
+ default:
+ RETURN_LONG(ret);
+ break;
+ }
}
/* }}} */
}
/* }}} */
-/* {{{ proto int mysqli_field_seek(object link, int fieldnr)
+/* {{{ proto int mysqli_field_seek(object result, int fieldnr)
Set result pointer to a specified field offset
*/
PHP_FUNCTION(mysqli_field_seek)