Jump to content

Copying data from one table to another


fizix

Recommended Posts

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!
Link to comment
https://forums.phpfreaks.com/topic/34907-copying-data-from-one-table-to-another/
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.