public static object GetField(PhpResource resultHandle, int rowIndex, object field) { PhpSqlDbResult result = PhpSqlDbResult.ValidResult(resultHandle); ScriptContext context = ScriptContext.CurrentContext; if (result == null) { return(null); } string field_name; object field_value; if (field == null) { field_value = result.GetFieldValue(rowIndex, result.CurrentFieldIndex); } else if ((field_name = PhpVariable.AsString(field)) != null) { field_value = result.GetFieldValue(rowIndex, field_name); } else { field_value = result.GetFieldValue(rowIndex, Core.Convert.ObjectToInteger(field)); } return(Core.Convert.Quote(field_value, context)); }
public static PhpObject FetchField(PhpResource resultHandle, int fieldIndex) { PhpSqlDbResult result = PhpSqlDbResult.ValidResult(resultHandle); if (result == null) { return(null); } return(FetchFieldInternal(result, fieldIndex)); }
public static bool DataSeek(PhpResource resultHandle, int rowIndex) { PhpSqlDbResult result = PhpSqlDbResult.ValidResult(resultHandle); if (result == null) { return(false); } return(result.SeekRow(rowIndex)); }
public static bool FieldSeek(PhpResource resultHandle, int fieldOffset) { PhpSqlDbResult result = PhpSqlDbResult.ValidResult(resultHandle); if (result == null) { return(false); } return(result.SeekField(fieldOffset)); }
public static int FieldLength(PhpResource resultHandle, int fieldIndex) { PhpSqlDbResult result = PhpSqlDbResult.ValidResult(resultHandle); if (result == null) { return(-1); } return(result.GetFieldLength(fieldIndex)); }
public static string FieldType(PhpResource resultHandle, int fieldIndex) { PhpSqlDbResult result = PhpSqlDbResult.ValidResult(resultHandle); if (result == null) { return(null); } return(result.GetPhpFieldType(fieldIndex)); }
public static string FieldName(PhpResource resultHandle) { PhpSqlDbResult result = PhpSqlDbResult.ValidResult(resultHandle); if (result == null) { return(null); } return(result.GetFieldName()); }
public static bool NextResult(PhpResource resultHandle) { PhpSqlDbResult result = PhpSqlDbResult.ValidResult(resultHandle); if (result == null) { return(false); } return(result.NextResultSet()); }
public static int GetRowCount(PhpResource resultHandle) { PhpSqlDbResult result = PhpSqlDbResult.ValidResult(resultHandle); if (result == null) { return(0); } return(result.RowCount); }
public static PhpObject FetchObject(PhpResource resultHandle) { PhpSqlDbResult result = PhpSqlDbResult.ValidResult(resultHandle); if (result == null) { return(null); } return(result.FetchObject()); }
public static bool FreeResult(PhpResource resultHandle) { PhpSqlDbResult result = PhpSqlDbResult.ValidResult(resultHandle); if (result == null) { return(false); } result.Close(); return(true); }
public static PhpArray FetchArray(PhpResource resultHandle, QueryResultKeys resultType) { PhpSqlDbResult result = PhpSqlDbResult.ValidResult(resultHandle); if (result == null) { return(null); } switch (resultType) { case QueryResultKeys.ColumnNames: return(result.FetchArray(false, true)); case QueryResultKeys.Numbers: return(result.FetchArray(true, false)); case QueryResultKeys.Both: return(result.FetchArray(true, true)); } return(null); }