mysqli_field_name($result,2); //email
I did not find a replacement function for mysql_field_name in php7. How can I achieve the same effect?
Thank you~
PHP中文网2017-05-16 13:08:16
php7 canceled support for mysql extension
If you use mysqli, you can write like this
<?php
$link = mysqli_connect('localhost', 'root', '', 'test');
$result = $link->query('select * from jobs');
echo $result->fetch_field_direct(0)->name;
我想大声告诉你2017-05-16 13:08:16
The mysql_ extension has been abandoned since php5.5. It has been removed since php7 and can be replaced with MySQLi or PDO_MySQL extension.