[moderator comment]
Your posts have been moved to their own thread. Hijacking somebody else's thread before their issue has been resolved is not appreciated in this forum, especially when your topic has such a tenuous link to the original.
[moderator comment]
Your posts have been moved to their own thread. Hijacking somebody else's thread before their issue has been resolved is not appreciated in this forum, especially when your topic has such a tenuous link to the original.
Kuroi Web Design and Development | Twitter
(Questions answered in the forum only - so that any forum member can benefit - not by personal message)
My bad, I figured that since he was looking for contracted work that he should do so in the 'Commercial Help Wanted' section. As such, I thought my question was more relevant to his question than his own question since he is not seeming like he'll wants support for it, rather to have somebody else do it. But I digress...
I'm new to forum posting, where do I go to get to where my link was moved to?
To clarify, I figured it out where it got moved to, but I am still having problems with this. Any help would be great. I tried looking up syntax rules in Google and nothing seems to work. If somebody could just show me how the table data replacement function would work using one of the replacement commands in the .sql, that would be uber awesome and I could just replicate the process for the 30 others I need to do... this is so frustrating!
The error that you're getting appears to relate to the quote character at the beginning of your query.
Is it possible that you have copied Zen Cart code that wraps the query with a single or double quote, which is being translated into an HTML entity that isn't valid in SQL?
The back quotes on the individual fields are rarely needed nowadays, at least if you're using a moderately recent version of MySQL.
Last edited by kuroi; 1 Aug 2011 at 07:38 PM. Reason: update on back quotes
Kuroi Web Design and Development | Twitter
(Questions answered in the forum only - so that any forum member can benefit - not by personal message)
I tried removing those backward apostraphe's and importing it but it did not work. I am not seeing any unneccessary single or double quotes, just the unneccesary `s that I tried removing but I still got the same error.REPLACE `zen_banners` (`banners_id`, `banners_title`, `banners_url`, `banners_image`, `banners_group`, `banners_html_text`, `expires_impressions`, `expires_date`, `date_scheduled`, `date_added`, `date_status_change`, `status`, `banners_open_new_windows`, `banners_on_ssl`, `banners_sort_order`) VALUES
(1, 'Wear', 'index.php', 'banner1.jpg', 'banner-1', '', 0, NULL, NULL, '0001-01-01 00:00:00', NULL, 1, 0, 1, 0),
(2, 'Unwind', 'index.php?main_page=product_info&cPath=7&products_id=13', 'banner2.jpg', 'banner-2', '', 0, NULL, NULL, '0001-01-01 00:00:00', NULL, 1, 0, 1, 0),
(3, 'Survive ', 'index.php?main_page=product_info&cPath=7&products_id=11', 'banner3.jpg', 'banner-3', '', 0, NULL, NULL, '0001-01-01 00:00:00', NULL, 1, 0, 1, 0),
(4, 'COBRABRAID', 'index.php?main_page=product_info&cPath=7&products_id=11', 'banner4.jpg', 'banner-4', '', 0, NULL, NULL, '0001-01-01 00:00:00', NULL, 1, 0, 1, 0),
(5, 'Nike Running', 'index.php?main_page=product_info&cPath=7&products_id=11', 'banner5.jpg', 'SideBox-Banners', '', 0, NULL, NULL, '0001-01-01 00:00:00', NULL, 1, 0, 1, 0);
When I open up the .sql, it opens up in Excel and it goes:
REPLACE affected_table (column headers) VALUES
then on separate lines it goes:
(value1,value2,etc),
(value1-2,value2-2,etc),
(etc);
could it be because it is not all on the same line?
Last edited by ConwayMJ; 1 Aug 2011 at 07:49 PM. Reason: needed to change somethign?
The SQL that you've posted is OK and would work provided your banners table has a zen_ prefix.
You've said that you keep getting the same error, but you haven't said what the error is when you use the REPLACE version of your query, so it's difficult to provide any help on it.
And I don't understand why you keep opening the query in Excel. Excel has its own way of interpreting data that render is an unreliable way of viewing raw data or code.
Kuroi Web Design and Development | Twitter
(Questions answered in the forum only - so that any forum member can benefit - not by personal message)