AlMch Posted August 11, 2020 Share Posted August 11, 2020 Hi, I'm by no means an expert in php but I use and continually try and figure out how to update some very old soccer stats scripts that break from time to time when newer versions of php are released. Anyway, I would appreciate any pointers with this error please: Warning: mysqli_query() expects parameter 3 to be integer, object given in /blah/blah/blah.php on line 81 The code is: 79 - mysqli_query($connection,"INSERT INTO seasons SET 80 - SeasonID = '$seasonid', 81 - SeasonPlayerID = '$player_id'",$connection) 82 - or die(mysqli_error($connection)); Server is running php 7.2.28 Thanks in advance. Quote Link to comment https://forums.phpfreaks.com/topic/311316-mysqli_query-expects-parameter-3-to-be-integer/ Share on other sites More sharing options...
mac_gyver Posted August 11, 2020 Share Posted August 11, 2020 from the php.net documentation - Quote mysqli_query( mysqli $link, string $query[, int $resultmode = MYSQLI_STORE_RESULT] ) : mixed the 3rd parameter is a result mode flag. are you using it this way in your code? Quote Link to comment https://forums.phpfreaks.com/topic/311316-mysqli_query-expects-parameter-3-to-be-integer/#findComment-1580544 Share on other sites More sharing options...
Barand Posted August 11, 2020 Share Posted August 11, 2020 Step 1 - read the error message Step 2 - look at the parameters in your code Step 3 - consult the reference manual to see what they should be Step 4 - adjust code accordingly Quote Link to comment https://forums.phpfreaks.com/topic/311316-mysqli_query-expects-parameter-3-to-be-integer/#findComment-1580545 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.