So I have a bit of a problem, I\'m EXTREMELY new to PHP and I\'m having a problem updating a string on my database, It\'s throwing out this error: Catchable fatal error: Obj
There are several problems with your code.
$query
, but using $result
when trying to fetch the result.$conn
), inside your query. It needs to be separated.Finally, you probably need to put quotes around your value.
$result = mysqli_query($conn, "UPDATE * wp_oxygenpurchaseusers
SET user_url = '2'
WHERE display_name = '$name'");
If user_url
is always a number, you should really convert it to type INT
instead of using a string.
$query = mysqli_query("$conn, UPDATE ");
you are passing one solid string into function, instead of 2 separate parameters. * is superfluous too.
Instead of leaving it to hang around forever with 1 or 2 occasional votes.