georg           Sun Jan 25 07:01:37 2004 EDT

  Modified files:              
    /php-src/ext/mysqli mysqli_api.c 
  Log:
  prototype fix for mysqli_fetch
  
  
http://cvs.php.net/diff.php/php-src/ext/mysqli/mysqli_api.c?r1=1.60&r2=1.61&ty=u
Index: php-src/ext/mysqli/mysqli_api.c
diff -u php-src/ext/mysqli/mysqli_api.c:1.60 php-src/ext/mysqli/mysqli_api.c:1.61
--- php-src/ext/mysqli/mysqli_api.c:1.60        Sat Jan 24 09:38:16 2004
+++ php-src/ext/mysqli/mysqli_api.c     Sun Jan 25 07:01:36 2004
@@ -15,7 +15,7 @@
   | Author: Georg Richter <[EMAIL PROTECTED]>                                |
   +----------------------------------------------------------------------+
 
-  $Id: mysqli_api.c,v 1.60 2004/01/24 14:38:16 georg Exp $ 
+  $Id: mysqli_api.c,v 1.61 2004/01/25 12:01:36 georg Exp $ 
 */
 
 #ifdef HAVE_CONFIG_H
@@ -628,7 +628,7 @@
 }
 /* }}} */
 
-/* {{{ 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)
 {
@@ -670,7 +670,7 @@
                                                        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);
@@ -695,7 +695,17 @@
                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;
+       }
 }
 /* }}} */
 
@@ -861,7 +871,7 @@
 }
 /* }}} */
 
-/* {{{ 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)

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to