fou2enve Posted March 29, 2008 Share Posted March 29, 2008 okay so im new to using mysqli, so im using basically the php example online to get it working. but i get a funky error: Fatal error: Call to a member function fetch_field() on a non-object in C:\htdocs\index.php on line 218 ive bolded line 218 bellow. any ideas as to what im doing wrong? thanks _KN $stmt = $mysqli->prepare("SELECT id, name FROM friends"); $stmt->execute(); /* get resultset for metadata */ $result = $stmt->result_metadata(); /* retrieve field information from metadata result set */ [b]$field = $result->fetch_field();[/b] printf("Fieldname: %s\n", $field->name); /* close resultset */ $result->close(); /* close connection */ $mysqli->close(); Link to comment https://forums.phpfreaks.com/topic/98476-mysqli-issue/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.