Re: script error
| From: | me2resh | Date: | Thu, 01 Jan 1970 00:00:00 +0000 |
| Subject: | Re: script error | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-192466@lists.php.net to get a copy of this message | ||
thanks for your help
i did that
and here is the error message returned
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 ''posts' (
post_id , post_title , post_date , `post_author
how can i fix it ?
-------Original Message-------
From: John Holmes
Date: 08/02/04 13:45:22
To: me2resh
Cc: php-general@lists.php.net
Subject: Re: [PHP] script error
> $query = "insert into 'posts' ( post_id ,
> post_title , post_date ,
> post_author , post_content ,
> m_cat_id , s_cat_id ,
> post_pic)
> values (\'\', \'$post_title, \'$post_title, \'$post_author,
> \'$post_content, \'\', \'\', \'subject.gif\' )";
> mysql_query($query);
Change that last line to
mysql_query($query) or die(mysql_error());
and run the script again. If you can't figure it out, post back with the
error message and what troubleshooting you've done.
--
John Holmes
php|architect - The magazine for PHP professionals - http://www.phparch.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php