Created
March 19, 2017 05:49
-
-
Save uzielweb/2b51cc1fc3c2f3e29588d80ded86410b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
insert into vl86p_categories (title,alias,parent_id,published,access,extension) select name,alias,parent,published,access,'com_content' from dnaur123_1.cththemes_k2_categories | |
INSERT INTO `dnaur123_teste`.`vl86p_content` (`id`, `title`, `alias`, `catid`, `introtext`, `fulltext`, `created`, `created_by`, `publish_up`, `publish_down`, `access`, `hits`, `metadesc`, `metakey`, `state`) SELECT `id`, `title`, `alias`, `catid`, `introtext`, `fulltext`, `created`, `created_by`, `publish_up`, `publish_down`, `access`, `hits`, `metadesc`, `metakey`, `published` FROM `dnaur123_1`.`cththemes_k2_items` | |
USE O RECURSO DE CONCATENAÇÃO DO EXCEL DEPOIS DE TOMAR NOTA DE TODAS AS CATEGORIAS PRESENTES NO K2 QUE FORAM IMPORTADAS E DAS NOVAS CATEGORIAS CRIADAS. TENHA EM MENTE QUE 74 É A NOVA CATEGORIA DE EXEMPLO E 1 É CATEGORIA ORIGINAL DE EXEMPLO, CUJAS QUAIS DEVEM SER TROCADAS VIA CONCATENAÇÃO | |
UPDATE vl86p_content SET catid = 74 WHERE catid = 1; | |
Ir em categorias e mandar reconstruir a árvore de categorias depois de tudo importado | |
ETAPA FINAL | |
TENHA EM MENTE QUE A IMAGEM E O ID DO ARTIGO DEVEM SER SUBSTITUÍDOS VIA CONCATENAÇÃO DO EXCEL E QUE O ASTERISCO E O APÓSTROFO DEVEM SER TROCADOS DEPOIS DE TUDO CONCATENADO | |
As imagens do k2 podem ser obtidas pelo painel de gerenciamento refinando o código HTML para que exiba os links... depois importa-se para uma tabela Excel. | |
Por fim faz-se a concatenação pelo seguinte parâmetro | |
UPDATE vl86p_content SET images = *{'image_intro':'images\\/olditems\\/36fdb1a35cd2f54f95cf2119fb5bc7ed.jpg','float_intro':'','image_intro_alt':'','image_intro_caption':'','image_fulltext':'','float_fulltext':'','image_fulltext_alt':'','image_fulltext_caption':''}* WHERE id = 38; | |
Lembre-se de que os parâmetros podem e devem ser substituíveis conforme o caso. | |
' troca-se por " e * troca-se por ' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment