I want to update some fields of my table. In order to do it I use the following command in phpmyadmin which works fine:
UPDATE tamrin SET tamrin.A =60 WHERE Team LIKE 'Pas' ;
but in php this command doesn't work. databse connection and everything else is correct because i can query my table's data.
My code looks like this:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="content-type">
<title>Result</title>
</head>
<body>
<?php
require 'db.inc';
// Connect to the MySQL server
if (!($connection = @ mysql_connect($hostname, $username, $password)))
die("Cannot connect");
if (!mysql_select_db("League", $connection))
showerror();
$query = "UPDATE 'tamrin' SET tamrin.A =60 WHERE Team LIKE 'Pas'";
if (mysql_affected_row()==0)
{
echo "query did nothing";
}
?>
</body>
</html>
I cannot see any change after this page in loaded