title: Button to display next column in Database
body: <p>Can anyone please explain to me why the screen doesn't display the next result in my database when I press it? I know the button gets picked up, just can't figure out why it doesn't do anything.</p>
  
  <pre><code>public static class PlaceholderFragment extends Fragment 
      {
  
          public PlaceholderFragment() 
          {
          }
          Cursor c;
          @Override
          public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) 
          {
              View rootView = inflater.inflate(
                      R.layout.fragment_resultsand_statistics, container, false);
  
  
              Button next = (Button)rootView.findViewById(R.id.next_result);
              next.setOnClickListener(new View.OnClickListener() 
              {
  
                  @Override
                  public void onClick(View v) 
                  {
                      c.moveToNext();
                  }
              });
  
              SQLController db = new SQLController(getActivity());
              TextView PA = (TextView)rootView.findViewById(R.id.PlayerA);
              TextView PB = (TextView)rootView.findViewById(R.id.PlayerB);
              TextView PAS = (TextView)rootView.findViewById(R.id.PlayerAS);
              TextView PBS = (TextView)rootView.findViewById(R.id.PlayerBS);
              db.open();
  
              c = db.readData();
              c.moveToFirst();
              String s = c.getString(c.getColumnIndex("playerA_name"));
              PA.setText(s);
              s = c.getString(c.getColumnIndex("playerB_name"));
              PB.setText(s);
              s = c.getString(c.getColumnIndex("playerA_score"));
              PAS.setText(s);
              s = c.getString(c.getColumnIndex("playerB_score"));
              PBS.setText(s);
              return rootView;
          }
      }
  </code></pre>