fizix Posted January 19, 2007 Share Posted January 19, 2007 Alright,I'm trying to copy data from my themes table to my style table. Here is my query:[code]$query="INSERT INTO `style` SELECT 'bgred', 'bggreen', 'bgblue', 'red1', 'green1', 'blue1', 'menuback', 'highlights', 'borders', 'textcolor', 'red', 'green', 'blue', 'linkcolor' FROM 'themes' WHERE default='1';";[/code]I'm getting the following error:[code]"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 ''themes' WHERE default='1'' at line 1"[/code]If anybody could help me resolve this error I'd be very greatful! Thanks! Quote Link to comment Share on other sites More sharing options...
printf Posted January 20, 2007 Share Posted January 20, 2007 Just remove the single quotes around 'theme'!printf Quote Link to comment Share on other sites More sharing options...
fizix Posted January 22, 2007 Author Share Posted January 22, 2007 Nope, now I get:[code]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 '='1'' at line 1[/code] Quote Link to comment Share on other sites More sharing options...
fizix Posted January 22, 2007 Author Share Posted January 22, 2007 NVM, figured it out. Can't use default as a column name. I'm dumb... 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.