I'm trying to execute the following mysqli statement:
SHOW TABLE STATUS LIKE 'QUESTIONS'
I want to loop through the result and find and return the value of Update_time.
I have found some examples on the web but can't get them to work within my PHP script.
My other PHP functions follow the following format and I'd like this function to match it.
public function getQuestionsSections() {
$stmt = mysqli_prepare($this->connection,
"SELECT DISTINCT
QUESTIONS.SECTION
FROM QUESTIONS");
$this->throwExceptionOnError();
mysqli_stmt_execute($stmt);
$this->throwExceptionOnError();
$rows = array();
mysqli_stmt_bind_result($stmt, $row->SECTION);
while (mysqli_stmt_fetch($stmt)) {
$rows[] = $row;
$row = new stdClass();
mysqli_stmt_bind_result($stmt, $row->SECTION);
}
mysqli_stmt_free_result($stmt);
mysqli_close($this->connection);
return $rows;
}
I'd really appreciate some help in writing the php function as I'm not a php programmer.
An answer to the problem is presented here,
Having trouble displaying last update time of mySQL table
Unfortunately it doesn't work for me. It would be ideal if we used the mysqli_prepare as above