I use MySQLi and PHP to call a MySQL stored procedure with prepared statements. It returns a result set with dozens of columns.
$stmt = $dbconnection->prepare("CALL SomebodysDbProcedure(?);"); $stmt->bind_param("s", $idvalue); $stmt->execute(); $stmt->bind_result($col1, $col2, $col3, ...);
However, I am only interested in a subset of the output columns.
The documentation says bind_result() is required to handle the full set of returned columns:
Note that all columns must be connected after mysqli_stmt_execute() and before mysqli_stmt_fetch() called.
Do I need to add code for those columns that I'm not interested in? If so, the application crashes if an extended result set is created in MySQL in the future, or even columns are rebuilt. Is there a workaround for this?
source share