public static int GetLastAffectedRows(PhpResource linkIdentifier) { PhpSqlDbConnection connection = PhpSqlDbConnection.ValidConnection(linkIdentifier); if (connection == null) { return(-1); } return(connection.LastAffectedRows); }
public static bool SelectDb(string databaseName, PhpResource linkIdentifier) { PhpSqlDbConnection connection = PhpSqlDbConnection.ValidConnection(linkIdentifier); if (connection == null) { return(false); } return(connection.SelectDb(databaseName)); }
public static bool Close(PhpResource linkIdentifier) { var connection = PhpSqlDbConnection.ValidConnection(linkIdentifier); if (connection == null) { return(false); } GetManager().RemoveConnection(connection); connection.Close(); return(true); }
public static PhpResource CreateProcedure(string procedureName, PhpResource linkIdentifier) { PhpSqlDbConnection connection = PhpSqlDbConnection.ValidConnection(linkIdentifier); if (connection == null) { return(null); } if (procedureName == null) { PhpException.ArgumentNull("procedureName"); return(null); } return(new PhpSqlDbProcedure(connection, procedureName)); }
public static PhpResource Query(string query, PhpResource linkIdentifier, int batchSize) { PhpSqlDbConnection connection = PhpSqlDbConnection.ValidConnection(linkIdentifier); if (query == null || connection == null) { return(null); } PhpSqlDbResult result = (PhpSqlDbResult)connection.ExecuteQuery(query.Trim(), true); if (result == null) { return(null); } result.BatchSize = batchSize; return(result); }