function db_getfieldslist($strSQL) { global $conn; $res=array(); $rs = mysqli_query($conn, $strSQL); while($finfo = mysqli_fetch_field($rs)) { $stype=db_fieldtypenum($finfo->type,$finfo->flags); $res[]=array("fieldname"=>$finfo->name,"type"=>$stype,"not_null"=>0); } $rs->close(); return $res; }
function db_getfieldslist($strSQL) { global $conn; $res=array(); $rs=db_query($strSQL,$conn); for($i=0;$i<db_numfields($rs);$i++) { $stype=oci_field_type($rs,$i+1); $ntype=db_fieldtypenum($stype); $res[$i]=array("fieldname"=>db_fieldname($rs,$i),"type"=>$ntype,"is_nullable"=>0); } return $res; }
function db_getfieldslist($strSQL) { global $conn; $res=array(); $rs=db_query($strSQL,$conn); for($i=0;$i<db_numfields($rs);$i++) { $stype=mysql_field_type($rs,$i); if($stype=="blob") { $flags=mysql_field_flags($rs,$i); if(strpos($flags,"binary")===false) $stype="text"; } $ntype=db_fieldtypenum($stype); $arr=mysql_fetch_field($rs,$i); $res[$i]=array("fieldname"=>db_fieldname($rs,$i),"type"=>$ntype,"not_null"=>0); } return $res; }