Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mysql update query (containing 'where' syntax) not working
- <?php
- $username = "root";
- $password = "1234";
- $database = "kitco";
- $con=mysql_connect(localhost,$username,$password);
- mysql_select_db($database) or die( "Unable to select database");
- $bid = '101010';
- $metal_name = 'Silver';
- $query = "update silver_and_pgm set _bid='$bid' where _metal_name='$metal_name'";
- //$query2 = "update silver_and_pgm set _bid='444'";;
- echo $query."<br>";
- $result = mysql_query($query);
- if(!$result)echo "error";
- ?>
Add Comment
Please, Sign In to add comment