- der Wert „links“ ist immer kleiner als der Wert „rechts“
Blatt
Rechts – Links = 1
Knoten
Rechts – Links > 1
Links zum Thema
Nested Sets
Mein Online – Notizbuch / Gehirn
Blatt
Rechts – Links = 1
Knoten
Rechts – Links > 1
Links zum Thema
Nested Sets
Die Beispieldatenbank „world database“ kann man von der MySql-Seite herunterladen.
public static void Main() { MySqlConnection MySql_Connection; string MySql_ConnectionString; MySql_ConnentionString = "server=localhost;"; MySql_ConnectionString += "user=root;"; MySql_ConnectionString += "database=world;"; MySql_ConnectionString += "password=******;"; MySql_Connection = new MySqlConnection(MySql_ConnentionString); try { MySql_Connection.Open(); // Verbindung öffnen string sql = "SELECT Name, HeadOfState FROM Country WHERE Continent='Oceania'"; MySqlCommand MySql_Command = new MySqlCommand(sql, MySql_Connection); MySqlDataReader MySql_DataReader = MySql_Command.ExecuteReader(); while (MySql_DataReader.Read()){ Console.WriteLine(MySql_DataReader[0] + " -- " + MySql_DataReader[1]); } } catch (Exception ex) { Console.WriteLine(ex.ToString()); } MySql_Connection.Close(); // Verbindung schließen }
public static void Main() { MySqlConnection MySql_Connection; string MySql_ConnectionString; MySql_ConnentionString = "server=localhost;"; MySql_ConnectionString += "user=root;"; MySql_ConnectionString += "database=world;"; MySql_ConnectionString += "password=******;"; MySql_Connection = new MySqlConnection(MySql_ConnentionString); try { MySql_Connection.Open(); // Verbindung öffnen } catch (Exception ex) { Console.WriteLine(ex.ToString()); } MySql_Connection.Close(); // Verbindung schließen }