PHP and MYSQL Update problem

[email protected] (Simone Fornara)
Newsgroups php.db
Message-ID <[email protected]>
Hello,
I have a little problem with a sql command string

$q = "UPDATE episodes SET episode_title = '$_POST[episode_title]' ,
episode_scheduleddate = ".strtotime($_POST['episode_scheduleddate'])."
, episode_description = '$_POST[episode_description]' WHERE episode_id
= $_POST[episode_id]";

I keep 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 ''

which doesn't help a lot. I've already tried to print the result

UPDATE episodes SET episode_title = 'Title test 1 edited 2' ,
episode_scheduleddate = 1232427600 , episode_description =
'Description test edited' WHERE episode_id = 1

I really can't find the problem. I tried almost every combination with
' and " without any result.

Thank you.
Simon.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.