Sunday 15 February 2015

Mysql php update function problem -


How do I create a php code to fallout for mysql?

If Active = 1 to Current amount + 2000

  Apply ID, EID, Zodiac, 1, Apply 2, Apply 3, Activate 1 1788 500 Nell Nell Faucet 1 2 1 3 1 9 62 1000 Faucet Nail Faucet 1 3 2035 1500 Faucet Faucet 1 And the output that does not have anything to replace.  
  id, eid, zodiac, apply 1, apply 2, apply 3, active 1 1788 2500 nail faucet 1 2 1 3 1 3 3 3 3 3 1 3 3 4 9 35 3 3 Nail faucet 1 3 2035 3500 Taps Nail faucet 1  

Thanks for helping people

The SQL query is as follows:

  update tablename SET zodiac = amount + 2000 WHER e active = 1;  

How do you implement it in PHP, depending on which database driver you are using.

For example, using mysqli :

  & lt ;? Php $ link = mysqli_init (); Mysql_real_connect ($ link, $ host, $ username, $ password, $ db_name); Mysqli_query ($ link, "update tablename SET zodiac = amount + 2000 WHERE active = 1");  

No comments:

Post a Comment