Jump to content

Query Help


herghost

Recommended Posts

Hi All,

 

I am getting this message when trying to run a query

 

oh dear1 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 'WHERE id='60'' at line 3

 

The Query

 

if(empty($view))
                           {
                        $view=1;
                        $sql4="INSERT INTO forum_question(view)
                        VALUES('$view') 
                        WHERE id='$id'";
                        $result4=mysql_query($sql4)or die ("oh dear1   " .mysql_error()) ;
                           }

 

What have i got wrong?

Link to comment
https://forums.phpfreaks.com/topic/175698-query-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.