0

I have no idea what I've done wrong, I've tried a lot of different things so far, reworking the statement, etc, but nothing seems to work.

I'm getting this error:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SET content='this is content', active='1' WHERE id='1'' at line 1

And this is the query I'm using:

UPDATE Pages SET title='$title', SET content='$content', active='$active' WHERE id='$id' 

I've checked to make sure that it's not what's being inserted that is the problem.

0

1 Answer 1

2

Delete the second SET into your query.

You have:

SET title='$title', SET content='$content'

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you so much! How on earth did I miss that!

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.