genzedu777 Posted December 27, 2010 Share Posted December 27, 2010 May I know what does this mean, this is the code which they are referring to. I have tried troubleshooting, still could not find the cause, appreciate if anyone can help? Thanks Warning: mysqli_error() expects exactly 1 parameter, 0 given in D:\inetpub\vhosts\championtutor.com\httpdocs\inc\elements\t_reg_post1.php on line 204 /**INSERT into tutor_musical_background table**/ foreach($musics as $music) { $query6 = "INSERT INTO tutor_musical_background (tutor_id, musical_instrument_id) VALUES ('$tutor_id', '$music')"; $results6 = mysqli_query($dbc, $query6) or die(mysqli_error()); Link to comment https://forums.phpfreaks.com/topic/222722-mysqli_error-expects-exactly-1-parameter-0-given/ Share on other sites More sharing options...
fxuser Posted December 27, 2010 Share Posted December 27, 2010 May I know what does this mean, this is the code which they are referring to. I have tried troubleshooting, still could not find the cause, appreciate if anyone can help? Thanks Warning: mysqli_error() expects exactly 1 parameter, 0 given in D:\inetpub\vhosts\championtutor.com\httpdocs\inc\elements\t_reg_post1.php on line 204 /**INSERT into tutor_musical_background table**/ foreach($musics as $music) { $query6 = "INSERT INTO tutor_musical_background (tutor_id, musical_instrument_id) VALUES ('$tutor_id', '$music')"; $results6 = mysqli_query($dbc, $query6) or die(mysqli_error()); try : $query6 = "INSERT INTO tutor_musical_background VALUES ('$tutor_id','$music')"; Link to comment https://forums.phpfreaks.com/topic/222722-mysqli_error-expects-exactly-1-parameter-0-given/#findComment-1151753 Share on other sites More sharing options...
revraz Posted December 27, 2010 Share Posted December 27, 2010 I believe your mysqli_error requires the connection string as a parameter. Link to comment https://forums.phpfreaks.com/topic/222722-mysqli_error-expects-exactly-1-parameter-0-given/#findComment-1151755 Share on other sites More sharing options...
revraz Posted December 27, 2010 Share Posted December 27, 2010 http://php.net/manual/en/mysqli.error.php Link to comment https://forums.phpfreaks.com/topic/222722-mysqli_error-expects-exactly-1-parameter-0-given/#findComment-1151756 Share on other sites More sharing options...
genzedu777 Posted December 27, 2010 Author Share Posted December 27, 2010 thanks Link to comment https://forums.phpfreaks.com/topic/222722-mysqli_error-expects-exactly-1-parameter-0-given/#findComment-1151765 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.