How I can update two different Mysql tables from android with one async task? -


I want to update two MySQL tables with an async function and different parameters when the button is clicked Is working properly when it's about a table .. how do I work this way?

The code on doInBackground () is:

  // Update data is being logged D ("AA to save", string.whouf (AA)); Log D. ("BB for saving", string.valouf (BB)); // Building Parameter List & lt; NameValuePair & gt; Parameters = new arreelist & lt; Named Wolopleyre & gt; (); Params.add (new binary namewallpayer (TAG_PID, P_ID)); Params.add (new binary namewallpear (TAG_aa, string.value (AA))); Params.add (new binary namewallpear (TAG_bb, String.valueOf (BB)); JSONObject json = jsonParser.makeHttpRequest (url_update_product, "POST", Parameters); // Updated data // Building parameter list & lt; NameValuePair & gt; Params_user = New Arreelist & lt; Nominal Peer & gt; (); Params_user.add (New BasicNameValuePair (TAG_UNAME, uname)); Params_user.add (new binary namewallpear (TAG_aa, string.value (aa)); Params_user.add (new binarynamewallpayer (TAG_bb, string.valof (BB)); JSONObject json_user = jsonParser.makeHttpRequest (url_update_user_votes, "POST", Parameters_user); // check json success tag {int success = json.getInt (TAG_SUCCESS); Int success2 = json_user.getInt (TAG_SUCCESS); If (success == 1 & amp; amp; success = 2 == 1) {// successfully updated I = getIntent () was updated; // Send the result code 100 to inform about the update set 100 (100, i); End(); } And {// failed to update}} hold (JasonXExation E) {e.printStackTrace (); }  

The error I get is: "java.lang.IllegalArgumentException: is not enclosed with window manager" on activity in which onActivityResult () is

Change two mysql tables in a php script and send success to succes2 in a json from server

 < Code> // is updating data log D ("AA save", string.valouf (AA)); Log D. ("BB for saving", string.valouf (BB)); // Building Parameter List & lt; NameValuePair & gt; Parameters = new arreelist & lt; Named Wolopleyre & gt; (); Params.add (new binary namewallpayer (TAG_PID, P_ID)); Params.add (New BasicNameValuePair (TAG_UNAME, uname)); Params.add (new binary namewallpear (TAG_aa, string.value (AA))); Params.add (new binary namewallpear (TAG_bb, String.valueOf (BB)); JSONObject json = jsonParser.makeHttpRequest (url_update_all, "post", params); // check json success tag {int success = json.getInt (TAG_SUCCESS); Int success2 = json.getInt (TAG_SUCCESS2); If (success == 1 & amp; amp; success = 2 == 1) {// successfully updated I = getIntent () was updated; // Send the result code 100 to inform about the update set 100 (100, i); End(); } And {// failed to update}} hold (JasonXExation E) {e.printStackTrace (); }  

Example php script

   

Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -