title: How to post and take data from MySQL for specific id from android app
body: <p>How to load data from MySQL for specific id. What I mean is when I click on gridview item 1 to load what I need for this item from MySQL. Currently I have </p>
  
  <pre><code>    $objConnect = mysql_connect("localhost","user","pass");
  $objDB = mysql_select_db("database");
  $strSQL = "SELECT * FROM table";
  $objQuery = mysql_query($strSQL);
  $intNumField = mysql_num_fields($objQuery);
  $resultArray = array();
  while($obResult = mysql_fetch_array($objQuery))
  {
      $arrCol = array();
      for($i=0;$i&lt;$intNumField;$i++)
      {
          $arrCol[mysql_field_name($objQuery,$i)] = $obResult[$i];
      }
      array_push($resultArray,$arrCol);
  }
  
  mysql_close($objConnect);
  
  echo json_encode($resultArray);
  </code></pre>
  
  <p>This obviously load everything from that table. But what if I want when I click on list item_1 to load some query like <code>select * from table where clickeditem = 1</code> ?
  I guess I must post it to the <code>.php</code> script but how?</p>
  
  <p>I don't know which part of JAVA code is needed so please tell me if you need and I will post it.
  Updated:
      @Override
          protected Void doInBackground(String... params) {
              // TODO Auto-generated method stub</p>
  
  <pre><code>        String url = "file.php";
  
          JSONArray data;
          try {
              resultServer = getJSONUrl(url);
              data = new JSONArray(resultServer);
  
              MyArrList = new ArrayList&lt;HashMap&lt;String, Object&gt;&gt;();
              HashMap&lt;String, Object&gt; map;
  
              for(int i = 0; i &lt; data.length(); i++){
                  JSONObject c = data.getJSONObject(i);
                  map = new HashMap&lt;String, Object&gt;();
                  map.put("id", (String)c.getString("id"));
                  map.put("name", (String)c.getString("name"));
                  map.put("price", (String)c.getString("price"));
                  map.put("weight", (String)c.getString("weight"));
  
                  // Thumbnail Get ImageBitmap To Bitmap
                  map.put("ImagePathThum", (String)c.getString("image"));
                  map.put("ImageThumBitmap", (Bitmap)loadBitmap(c.getString("image")));
  
                  // Full (for View Full)
                  map.put("ImagePathFull", (String)c.getString("image_big"));
  
                  MyArrList.add(map);
              }
  
  
          } catch (JSONException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
          }
  
          return null;
      }
  </code></pre>
  
  <p>UPDATE with sql.</p>
  
  <pre><code>    $strSQL = "SELECT m.id, name, image, image_big, weight, price 
          FROM posts m 
          JOIN packet_r mr 
          ON m.id = mr.id 
          WHERE packed_id = 1";
  </code></pre>