Guest User

Untitled

a guest
Aug 15th, 2018
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. mysql update query (containing 'where' syntax) not working
  2. <?php
  3.  
  4. $username = "root";
  5. $password = "1234";
  6. $database = "kitco";
  7. $con=mysql_connect(localhost,$username,$password);
  8. mysql_select_db($database) or die( "Unable to select database");
  9.  
  10. $bid = '101010';
  11. $metal_name = 'Silver';
  12.  
  13. $query = "update silver_and_pgm set _bid='$bid' where _metal_name='$metal_name'";
  14. //$query2 = "update silver_and_pgm set _bid='444'";;
  15. echo $query."<br>";
  16. $result = mysql_query($query);
  17. if(!$result)echo "error";
  18.  
  19. ?>
Add Comment
Please, Sign In to add comment