SQL update not working
#1

hello and this is my code :

Код:
if(dialogid == SEXMENU)
	{
		if(response)
				{
         	        
             		
             		//man
        		    new name[MAX_PLAYER_NAME],query[128],psex[2];
					GetPlayerName(playerid,name,sizeof(name));
 		  			format(query,sizeof(query),"INSERT INTO accounts WHERE name='%s' (psex) VALUES ('1') ",psex);
					mysql_function_query(sqlconnect,query,false,"","");
   		    	    
   		    	    
   		    	    
   		    	    SetPlayerSkin(playerid, 185);
   		    	   	ShowPlayerDialog(playerid, AGEMENU, DIALOG_STYLE_INPUT, "{00C0FF}Amzius", "{FFFFFF}Kiek jums metu ?", "Submit", "Cancel");
 			        return 0;
 			    }
   				else
 	    		{
                   //woman
              	
        		      new name[MAX_PLAYER_NAME],query[128],psex[2];
					GetPlayerName(playerid,name,sizeof(name));
 		  			format(query,sizeof(query),"INSERT INTO accounts WHERE name='%s' (psex) VALUES ('2') ",psex);
					mysql_function_query(sqlconnect,query,false,"","");
   		    	    
   		    	    SetPlayerSkin(playerid, 193);
              		ShowPlayerDialog(playerid, AGEMENU, DIALOG_STYLE_INPUT, "{00C0FF}Amzius", "{FFFFFF}Kiek jums metu ?", "Submit", "Cancel");
 			        return 0;
				}
  	}
what do i want to do is update one column in my sql db this code dont give my any error but it wont update my sql aswell ware can by a problem .this code is about gender its gives dialog and let u choose what gender is yours and i need to save and set 1 for male and 2 for female into db , please help
Reply


Messages In This Thread
SQL update not working - by cyberlord - 14.12.2014, 11:57
Re: SQL update not working - by zT KiNgKoNg - 14.12.2014, 12:01
Re: SQL update not working - by Vince - 14.12.2014, 12:10
Re: SQL update not working - by cyberlord - 14.12.2014, 12:13
Re: SQL update not working - by cyberlord - 14.12.2014, 13:48
Re: SQL update not working - by cyberlord - 14.12.2014, 15:52
Re: SQL update not working - by cyberlord - 14.12.2014, 17:38

Forum Jump:


Users browsing this thread: 1 Guest(s)