18303 shaares
1707 private links
1707 private links
WITH RECURSIVE urls AS
(
SELECT
parent.ID AS id,
parent.post_parent AS parent,
parent.post_name AS url,
parent.post_type,parent.post_status AS status
FROM
wp_posts as parent
WHERE
parent.post_parent=0
AND
parent.post_type='page'
AND
parent.post_status='publish'
UNION
SELECT
enfant.ID AS id,
enfant.post_parent AS parent,
CONCAT(urls.url,'/',enfant.post_name) AS url,
enfant.post_type AS type,
enfant.post_status AS status
FROM
urls INNER JOIN wp_posts AS enfant ON enfant.post_parent=urls.id
WHERE
enfant.post_type='page'
AND
enfant.post_status='publish'
)
SELECT
CONCAT('https://www.dsfc.net/',url,'/') AS url
FROM
urls
ORDER BY
url;