Skip to content

Update vom StoreLocator Extended

Daniel Jahnsmüller edited this page Jul 22, 2015 · 2 revisions

Benutzen Sie diese SQL-Anweisung um von einem bestehenden „StoreLocator Extended“ zu anyStores zu wechseln.

INSERT INTO 
    tl_anystores
    (
        id,
        pid,
        tstamp,
        name,
        alias,
        email,
        url,
        phone,
        fax,
        logo,
        street,
        postal,
        city,
        country,
        description,
        opening_times,
        longitude,
        latitude,
        published
    )
SELECT 
    id,
    pid,
    tstamp,
    name,
    UUID(),
    email,
    url,
    phone,
    fax,
    logo,
    street,
    postal,
    city,
    country,
    description,
    REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(opening_times,'s:2:"MO"','s:3:"mon"'),'s:2:"TU"','s:3:"tue"'),'s:2:"WE"','s:3:"wed"'),'s:2:"TH"','s:3:"thu"'),'s:2:"FR"','s:3:"fri"'),'s:2:"SA"','s:3:"sat"'),'s:2:"SO"','s:3:"sun"') AS opening_times,
    longitude,
    latitude,
    1
FROM 
    tl_storelocator_stores;

INSERT INTO 
    tl_anystores_category
    (
        id,
        tstamp,
        title
    )
SELECT
    id,
    tstamp,
    title
FROM 
    tl_storelocator_category;
Clone this wiki locally