title: Android App not syncing with database
body: <p>The Andriod app I'm developing is using Http Gets/Posts using PHP files on my website to perform transactions on a mysql database.</p>
  
  <p>On the PHP side, I wrap the data up with JSON to parse on the java end of the app when receiving a response.  I recently modified one of the tables and eliminated unnecessary values from the table.  When I poll using the PHP scripts from my website, it polls correctly.  When I use the app, which uses the same PHP script for polling, it returns the additional values I already removed from the database.</p>
  
  <p>I've restarted Eclipse, cleaned the project, and restarted the android VDM to refresh it; however, it continues to find those values that were removed.  Any ideas as to what is going on?</p>
  
  <p>Here is the php script I'm connecting to from the app:</p>
  
  <pre><code>&lt;?php
  mysql_connect("localhost", "******", "******");
  mysql_select_db("bouncet2_pogoapp");
  
  $query = "SELECT * FROM Event_Table ORDER BY Event ASC";
  $sql = mysql_query($query);
  
  while($row=mysql_fetch_assoc($sql))
  $output[]=$row;
  
  print(json_encode($output));
  
  mysql_close();
  ?&gt;
  </code></pre>
  
  <p>As for my code in the app using the script:</p>
  
  <pre><code>try {
          String response = CustomHttpClient.executeHttpGet("http://www.*****.com/****/****/***/GetEvents.php");
          //System.out.println(response);
  
          try {
              eventArray = new JSONArray(response);
              //Log.i(SelectEventActivity.class.getName(), "Number of entries " + eventArray.length());
  
              m_adapterForSpinner = new ArrayAdapter&lt;String&gt;(this, android.R.layout.simple_spinner_item);
              m_adapterForSpinner.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
  
              event_Spinner.setAdapter(m_adapterForSpinner);          
  
              for (int i = 0; i &lt; eventArray.length(); i++) {
                  JSONObject jsonObject = eventArray.getJSONObject(i);
                  m_adapterForSpinner.add(jsonObject.getString("Event"));
                  //Log.i(AddJumpersActivity.class.getName(), jsonObject.getString("Event"));
              }
  
          } catch (Exception e) {
              e.printStackTrace();
          }           
      } catch (Exception e) {
          e.printStackTrace();
      }
  </code></pre>
  
  <p>The function executeHttpGet(URL) is part of a class CustomHttpClient and is as follows:</p>
  
  <pre><code>public static String executeHttpGet(String url) throws Exception {
  
      StringBuilder builder = new StringBuilder();
      HttpClient client = getHttpClient();
      HttpGet request = new HttpGet();
      request.setURI(new URI(url));
  
      try {            
          HttpResponse response = client.execute(request);
          StatusLine statusLine = response.getStatusLine();
          int statusCode = statusLine.getStatusCode();
  
          if (statusCode == 200) {
              Log.i(CustomHttpClient.class.toString(), "System Status OK");
              HttpEntity entity = response.getEntity();
              InputStream content = entity.getContent();
              BufferedReader reader = new BufferedReader(new InputStreamReader(content));
              String line;
              while ((line = reader.readLine()) != null) {
                  builder.append(line);
              }
          } else {
              Log.e(CustomHttpClient.class.toString(), "Failed to download file");
          } 
      } catch (ClientProtocolException e) {
          e.printStackTrace();
      } catch (IOException e) {
          e.printStackTrace();
      }
  
      return builder.toString();            
  }
  </code></pre>