|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-07-20 11:28 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 03:00:02 2025 UTC |
Description: ------------ sorry bad English. Warning: mysqli_error() expects exactly 1 parameter, 0 given in E:\htdocs\index.php on line 30 Click Reload-button work: Ok Click Reload-button Warning: mysqli_error() expects exactly 1 parameter, 0 given in E:\htdocs\index.php on line 30 Click Reload-button work: Ok Click Reload-button Warning: mysqli_error() expects exactly 1 parameter, 0 given in E:\htdocs\index.php on line 30 etc...... What is wrong? WinXP (home) Apache 2.0.50 MySQL 4.1.3-beta Reproduce code: --------------- <?php $link = mysqli_connect("localhost", "xxx", "xxxx", "test"); /* check connection */ if (mysqli_connect_errno()) { printf("Connect failed: %s\n", mysqli_connect_error()); exit(); } $query = "SELECT CURRENT_USER();"; $query .= "SELECT Name FROM City ORDER BY ID LIMIT 20, 5"; /* execute multi query */ if (mysqli_multi_query($link, $query)) { do { /* store first result set */ if ($result = mysqli_store_result($link)) { while ($row = mysqli_fetch_row($result)) { printf("%s\n", $row[0]); } mysqli_free_result($result); } /* print divider */ if (mysqli_more_results($link)) { printf("-----------------\n"); } } while (mysqli_next_result($link)); } else mysqli_error(); /* close connection */ mysqli_close($link); ?>