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.