I'm really pulling my hair out with this one. I'm trying to update my articles table.
My SELECT statement works fine
$result = mysql_query("SELECT * FROM articles") or die(mysql_error());
But my UPDATE statemnt fails, while not throwing any mysql errors.
$sql = "UPDATE articles SET kudos = 10 WHERE id = 1" ;
$query = mysqli_query($sql)or die(mysql_error());
Any and all help is appreciated!
EDIT: I'm determining it failed with this if statement
if($query) {
echo 'it worked';
} else {
echo 'it failed';
}
$query = mysql_query($sql)or die(mysql_error());<=?Since your working copy usesmysql_query- mixing both functions on one line doesn't help neither.