public static CorePhrase[] getPhrases(Connection con, Dictionary dict, User user)
	{
		LinkedList<CorePhrase> data = new LinkedList<CorePhrase>();
		try
		{
			PreparedStatement ps = con.prepareStatement(
					"SELECT Phrases.ID, Success, RevSuccess, Performances.ID " +
					"FROM Phrases " +
					"LEFT OUTER JOIN Performances ON Phrases.ID = Phrase AND UserID = ? " +
					"WHERE Phrases.Dic = ? " +
					"ORDER BY Performances.Success ASC ");

			ps.setString(1, user.getID());
			ps.setString(2, dict.getID());

			ResultSet rs = ps.executeQuery();

			while (rs.next())
			{
				CorePhrase phrase = new CorePhrase(rs.getInt(1), rs.getInt(2), rs.getInt(4), false);
				CorePhrase revPhrase = new CorePhrase(rs.getInt(1), rs.getInt(3), rs.getInt(4), true);

				phrase.revPhrase = revPhrase;
				revPhrase.revPhrase = phrase;

				data.add(phrase);
				data.add(revPhrase);
			}

			rs.close();
		}
		catch (SQLException sqle)
		{
			if (sqle.getSQLState().equals("42X05")) // table does not exist
			{
				if (sqle.getMessage().contains(Performance.tableInfo.tableName.toUpperCase()))
				{
					DBObject.createTable(con, Performance.tableInfo);
					return getPhrases(con, dict, user);
				}
				else if (sqle.getMessage().contains(Phrase.tableInfo.tableName.toUpperCase()))
				{
					DBObject.createTable(con, Phrase.tableInfo);
					return getPhrases(con, dict, user);
				}
				else
				{
					System.out.println("MESSAGE: "  + sqle.getMessage());
					System.out.println("ERROR CODE: " + sqle.getSQLState());
				}
			}
		}

		return (CorePhrase[]) data.toArray(new CorePhrase[data.size()]);
	}