Copying title to meta
can anyone write me a SQL code that copies my product name into the title tag, meta keywords and meta description boxes so i dont have to go through 2000 product pages? I cant seem to find the tables they are stored in.
|
Re: Copying title to meta
Off the top of my head (untested), how about something like this:
UPDATE: This did not work Code:
|
Re: Copying title to meta
#1064 - 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 '(title_tag, meta_keywords, meta_description) = (
SELECT product, product, pro' at line 2 |
Re: Copying title to meta
Maybe something like this instead (untested):
UPDATE: This did not work (probably would for MSSQL) Code:
UPDATE xcart_products p |
Re: Copying title to meta
In 4.6.x product name is NOT in products table so this will not work. Same for product's meta tags
They are all in product XX table - XX being language |
Re: Copying title to meta
What won't work?
|
Re: Copying title to meta
The query won't work the way it is.
This UPDATE xcart_products, xcart_products_lng_en SET xcart_products.title_tag = xcart_products_lng_en.product, xcart_products.meta_keywords = xcart_products_lng_en.product, xcart_products.meta_description = xcart_products_lng_en.product WHERE xcart_products.productid = xcart_products_lng_en.productid; But make sure you backup first |
Re: Copying title to meta
Thanks for clarifying. However, the query did not fail because of the location of the product name. Your implicit JOIN is interesting but not clear. I prefer this:
Code:
UPDATE xcart_products p JOIN xcart_products_lng_en pl ON pl.productid = p.productid |
Re: Copying title to meta
Either way, as long as it works...
|
All times are GMT -8. The time now is 01:02 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.