I am working on porting some code over from mysql_ to mysqli_ equivalents, however I stumbled accross something that doesn't seem to be a straight conversion:
I have the following code
if($field_flags == false) {
for($j=0; $j<$num_fields; $j++) {
$field_flags[$j] = mysql_field_flags($result, $j);
if(strpos($field_flags[$j], 'not_null') !== false) {
$field_flags[$j] = false;
} else {
$field_flags[$j] = true;
}
}
}
And I am having trouble porting it as the new method "mysqli_fetch_field_direct" doesn't seem to be as straightforward.
Could someone please assist me with porting the above code. Essentially, I am checking if the field allows nulls or not.