public static int FieldLength(PhpResource resultHandle, int fieldIndex) { PhpSqlDbResult result = PhpSqlDbResult.ValidResult(resultHandle); if (result == null) { return(-1); } return(result.GetFieldLength(fieldIndex)); }
private static PhpObject FetchFieldInternal(PhpSqlDbResult /*!*/ result, int fieldIndex) { DataRow info = result.GetSchemaRowInfo(fieldIndex); if (info == null) { return(null); } string s; PhpObject obj = new stdClass(); string php_type = result.GetPhpFieldType(fieldIndex); obj.Add("name", result.GetFieldName(fieldIndex)); obj.Add("column_source", (s = info["BaseColumnName"] as string) != null ? s : ""); obj.Add("max_length", result.GetFieldLength(fieldIndex)); obj.Add("numeric", result.IsNumericType(php_type) ? 1 : 0); obj.Add("type", php_type); return(obj); }
private static PhpObject FetchFieldInternal(PhpSqlDbResult/*!*/ result, int fieldIndex) { DataRow info = result.GetSchemaRowInfo(fieldIndex); if (info == null) return null; string s; PhpObject obj = new stdClass(); string php_type = result.GetPhpFieldType(fieldIndex); obj.Add("name", result.GetFieldName(fieldIndex)); obj.Add("column_source", (s = info["BaseColumnName"] as string) != null ? s : ""); obj.Add("max_length", result.GetFieldLength(fieldIndex)); obj.Add("numeric", result.IsNumericType(php_type) ? 1 : 0); obj.Add("type", php_type); return obj; }