@@ -1030,7 +1030,7 @@ public function getVariable(
10301030 $ modifier = '' ;
10311031 }
10321032
1033- return $ this ->fetchValue ('SHOW ' . $ modifier . ' VARIABLES LIKE \'' . $ var . '\'; ' , 0 , 1 , $ link );
1033+ return $ this ->fetchValue ('SHOW ' . $ modifier . ' VARIABLES LIKE \'' . $ var . '\'; ' , 1 , $ link );
10341034 }
10351035
10361036 /**
@@ -1200,18 +1200,15 @@ public function postConnectControl(Relation $relation): void
12001200 * // $user_name = 'John Doe'
12011201 * </code>
12021202 *
1203- * @param string $query The query to execute
1204- * @param int $row_number row to fetch the value from,
1205- * starting at 0, with 0 being default
1206- * @param int|string $field field to fetch the value from,
1207- * starting at 0, with 0 being default
1208- * @param int $link link type
1203+ * @param string $query The query to execute
1204+ * @param int|string $field field to fetch the value from,
1205+ * starting at 0, with 0 being default
1206+ * @param int $link link type
12091207 *
12101208 * @return mixed|false value of first field in first row from result or false if not found
12111209 */
12121210 public function fetchValue (
12131211 string $ query ,
1214- int $ row_number = 0 ,
12151212 $ field = 0 ,
12161213 $ link = self ::CONNECT_USER
12171214 ) {
@@ -1220,14 +1217,7 @@ public function fetchValue(
12201217 return false ;
12211218 }
12221219
1223- // return false if result is empty or false
1224- // or requested row is larger than rows in result
1225- if ($ this ->numRows ($ result ) < $ row_number + 1 ) {
1226- return false ;
1227- }
1228-
12291220 // get requested row
1230- $ this ->dataSeek ($ result , $ row_number );
12311221 $ row = $ this ->fetchByMode ($ result , is_int ($ field ) ? self ::FETCH_NUM : self ::FETCH_ASSOC );
12321222
12331223 // return requested field
@@ -1507,7 +1497,7 @@ public function getDefinition(
15071497 $ query = 'SHOW CREATE ' . $ which . ' '
15081498 . Util ::backquote ($ db ) . '. '
15091499 . Util ::backquote ($ name );
1510- $ result = $ this ->fetchValue ($ query , 0 , $ returned_field [$ which ], $ link );
1500+ $ result = $ this ->fetchValue ($ query , $ returned_field [$ which ], $ link );
15111501
15121502 return is_string ($ result ) ? $ result : null ;
15131503 }
@@ -2113,7 +2103,7 @@ public function insertId($link = self::CONNECT_USER)
21132103 // When no controluser is defined, using mysqli_insert_id($link)
21142104 // does not always return the last insert id due to a mixup with
21152105 // the tracking mechanism, but this works:
2116- return $ this ->fetchValue ('SELECT LAST_INSERT_ID(); ' , 0 , 0 , $ link );
2106+ return $ this ->fetchValue ('SELECT LAST_INSERT_ID(); ' , 0 , $ link );
21172107 }
21182108
21192109 /**
0 commit comments