PHP: mysqli_stmt::$field_count - Manual (original) (raw)
`<?php
mysqli_report
(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT); mysqli=mysqliconnect("localhost","myuser","mypassword","world");mysqli = mysqli_connect("localhost", "my_user", "my_password", "world");mysqli=mysqliconnect("localhost","myuser","mypassword","world");code = 'FR';$stmt = mysqli_prepare($mysqli, "SELECT Name FROM Country WHERE Code=?");
mysqli_stmt_bind_param($stmt, 's', $code);
mysqli_stmt_execute($stmt); result=mysqlistmtgetresult(result = mysqli_stmt_get_result(result=mysqlistmtgetresult(stmt); row=mysqlifetchrow(row = mysqli_fetch_row(row=mysqlifetchrow(result);
for ($i = 0; i<mysqlistmtfieldcount(i < mysqli_stmt_field_count(i<mysqlistmtfieldcount(stmt); $i++) {
printf("Value of column number %d is %s", i,i, i,row[$i]);
}`
Value of column number 0 is France