From: max at webscript dot ru Operating system: WinXP Pro PHP version: 5CVS-2005-10-21 (snap) PHP Bug Type: Feature/Change Request Bug description: [MYSQLI] mysqli_statement and binding array
Description: ------------ Binding array for results of prepared statments in mysqli. Reproduce code: --------------- now if I want to work with result of prepared statements I should use mysqli_bind_result(). And if i use table with many columns i need to write variable for all this columns : ----- $stmt = mysqli_prepare($link, "SELECT * FROM test_bind_fetch"); mysqli_bind_result($stmt, $c1, $c2, $c3, $c4, $c5, $c6, $c7); ----- I think it would be better to make function mysqli_bind_result_array($stmt, $array, $array_type); Where $stmt - mysqli_statement $array - array, where we will save data from query $array_type = MYSQLI_ASSOC || MYSQLI_NUM || MYSQLI_BOTH I know, that this can be emulated with mysqli_fetch_fileds() + call_user_func_array() but it's not comfortable :-) Expected result: ---------------- $stmt = mysqli_prepare($link, "SELECT * FROM test_bind_fetch"); mysqli_bind_result_array($stmt, $row, MYSQLI_ASSOC); mysqli_fetch($stmt); ... now $row will contain data from one record of our query Actual result: -------------- no result yet -- Edit bug report at http://bugs.php.net/?id=34948&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34948&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34948&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34948&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=34948&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=34948&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=34948&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=34948&r=needscript Try newer version: http://bugs.php.net/fix.php?id=34948&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=34948&r=support Expected behavior: http://bugs.php.net/fix.php?id=34948&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=34948&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=34948&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=34948&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34948&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=34948&r=dst IIS Stability: http://bugs.php.net/fix.php?id=34948&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=34948&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=34948&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=34948&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=34948&r=mysqlcfg