My php script seems to not want to update my table although the exact query im trying to run works when i use it directly in the MySQL console. Also I have to say that selection querys have worked for me, its only updates that dont work..
heres my code:
ConnectToMySQL();
function ConnectToMySQL() {
/* First Connects to the Server */
$link = mysql_connect("localhost", "root", "*******");
if (!$link) {
die("Could not connect: " . mysql_error());
}
/* Than chooses the DB */
$db_selected = mysql_select_db("irina", $link);
if (!$db_selected) {
die ("Can't use internet_database : " . mysql_error());
}
}
$Query = "UPDATE subtopics SET SubTopic_Name = 'spirit' WHERE SubTopic_ID='spirituality';";
mysql_query($Query);
again I want to point out to you that the query has proven to work in the MySQL console, and that other querys work for me.

mysql_*functions are deprecated in PHP 5.5. It is not recommended for writing new code as it will prevent you from upgrading in the future. Instead, use either MySQLi or PDO and be a better PHP Developer.mysql_error()output?;in the query. Queries throughmysql_queryshould not end in a semicolon: "An SQL query: The query string should not end with a semicolon. Data inside the query should be properly escaped." (php.net/manual/en/function.mysql-query.php) But as the others said, don't usemysql_query()as it's been depreciated.