mysql_field_name to the new mysqli

I’m not sure if there is a better way to do that, but I checked that this works to get just the name of the columns and is the new mysqli :

$result = mysqli_query($con, 'SELECT * FROM myTable');
while ($property = mysqli_fetch_field($result)) {
    echo $property->name;
}

Leave a Comment