AncientSage Posted August 2, 2006 Share Posted August 2, 2006 Hello,I'm attempting to put variables into a column, but it appears to be giving me problems: [code]INSERT INTO file (id, song_filename, song_name, song_author, song_genre) VALUES ('', $file, $name, $type, $description);[/code]Yeah, it's telling me "unknown column *putvalueof$filehere* in" It's thinking the variables are columns, how would I get around this? Quote Link to comment Share on other sites More sharing options...
king arthur Posted August 2, 2006 Share Posted August 2, 2006 If they are string variables you need to enclose them in quotes.[code]INSERT INTO file (id, song_filename, song_name, song_author, song_genre) VALUES ('', '$file', '$name', '$type', '$description');[/code] Quote Link to comment Share on other sites More sharing options...
AncientSage Posted August 2, 2006 Author Share Posted August 2, 2006 Ah, that would explain it. Thanks. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.