Hi there,
I have almost successfully migrated from Drupal 6 to WordPress 3.03.
Almost, because I am trying to import my slugs (called url_alias in Drupal) to WordPress. I have all the bits I need, but I am not able to fit it all together so that mysql accepts it. Maybe some mysql pro could help me bit....?
I have this working:
SELECT post_name, SUBSTRING(dst, POSITION('/' IN dst)+1) AS Slug
FROM w3fwp_posts, 553_w3drpfilter.url_alias
WHERE post_type LIKE 'post'
AND post_type NOT LIKE 'page'
AND post_name NOT LIKE ''
AND post_name = SUBSTRING(dst FROM 1 FOR POSITION('/' IN dst)-1)
Now I wanted to actually update the wp_posts.post_name using my Slug, but this doesn't work.
Here's what I did:
UPDATE wordpress.w3fwp_posts
SET post_name = (
SELECT SUBSTRING(dst, POSITION('/' IN dst)+1)
FROM w3fwp_posts, 553_w3drpfilter.url_alias
WHERE post_type LIKE 'post'
AND post_type NOT LIKE 'page'
AND post_name NOT LIKE ''
AND post_name = SUBSTRING(dst FROM 1 FOR POSITION('/' IN dst)-1)
)
Any ideas? I'm growing desperate... ;(