public static int entries(Connection con, TableInfo tableInfo)
	{
		int ret = 0;

		try
		{
			PreparedStatement ps = con.prepareStatement("SELECT COUNT(*) FROM " + tableInfo.tableName);

			ResultSet rs = ps.executeQuery();
			rs.next();
			ret = rs.getInt(1);

			rs.close();
		}
		catch (SQLException sqle)
		{
			if (sqle.getSQLState().equals("42X05"))
			{
				createTable(con, tableInfo);
				ret = 0;
			}
			else
			{
				System.out.println(sqle);
				System.out.println("Incorrect table definition. Drop table "
								+ tableInfo.tableName + " and rerun this program");
				System.exit(0);
			}
		}

		return ret;
	}