Jump to content

something wrong with my mysql syntax?


dsaba

Recommended Posts

keep getting:

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 `fileid`=''' at line 1

 

only at line 110 does sql syntax even begin

 

i keep double checking my variables and my syntax i don't seem to find anythign wrong, maybe I'm not properly spacing the inserts or updates, or queries???

please tell me if this is proper sql syntax for php

 

$query2 = "INSERT INTO `videos` ( `videoname`, `videofileid` )";

$result3 = mysql_query("SELECT filesubmitter FROM mainfilelist WHERE filesubmitter='$videosubmitter'");

$query4 = "UPDATE `userinfo` SET `userip`='$videosubmitter', `userlanguage`='$videosubmitlang', WHERE `username`='$videosubmitter'";

$query4 = "INSERT INTO `userinfo` ( `username`, `userip`, `useremail`, `userwebsite`, `userlanguage`, `userfilecount`, `userlastactive` )
VALUES ( '$svideosubmitter','$svideosubmitterip','$svideosubmitteremail','$svideosubmitterwebsite','$svideosubmitterlang','$userfilecountifnew','$svideodatetime' )";

 

thanks in advance :)

Link to comment
https://forums.phpfreaks.com/topic/40272-something-wrong-with-my-mysql-syntax/
Share on other sites

ah sorry i just took snippets from my script

here is a more complete look at my insert syntax

$query4 = "INSERT INTO `userinfo` ( `username`, `userip`, `useremail`, `userwebsite`, `userlanguage`, `userfilecount`, `userlastactive` )
VALUES ( '$svideosubmitter','$svideosubmitterip','$svideosubmitteremail','$svideosubmitterwebsite','$svideosubmitterlang','$userfilecountifnew','$svideodatetime' )";

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.