Created
September 12, 2012 19:10
-
-
Save KariTrace/3709179 to your computer and use it in GitHub Desktop.
Works locally (win), remotely says "undefined method mysqli_result::fetch_all()" (CentOS 6)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
echo("<PRE>"); | |
print_r( $conn );// prints out mysqli Object | |
echo("</PRE>"); | |
//create SQL query | |
$stmt = "SELECT column_name FROM information_schema.columns WHERE table_name = '". $tableName ."' ORDER BY ordinal_position"; | |
$query = $conn->query($stmt); | |
//execute query | |
$clmNames = $query->fetch_all(MYSQLI_ASSOC); //error log states "PHP Fatal error: Call to undefined method mysqli_result::fetch_all() in ... | |
//clear memory | |
$query->free();unset($query); | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment