joomla/div.sql

select * 
from (
  select ty || id, c, left(title, 30) tit , cx, substr(t, cx, locate('"', t, cx+6) + 1 - cx) r
    from ( select ty, id, title, 1 + c *10 + d c, t,  char_length(substring_index(t, 'href="', 1 + c *10 + d)) + 1 cx
        from ( select 'coIn' ty, id, title, introText t from spWaJ34_content 
        ) t
        ,(
            select 0 c
            union all select 1 
            union all select 2 
            union all select 3 
            union all select 4
              ) c
        ,(
            select 0 d
            union all select 1 
            union all select 2 
            union all select 3 
            union all select 4
            union all select 5
            union all select 6
            union all select 7
            union all select 8
            union all select 9
              ) d
) s
    where cx > 0 and cx < char_length(t)
    order by id, cx
)r
where r not like 'href="http%'
    and r not like 'href="files/%'
    and r not like 'href="images/%'
    and r not like 'href="mailto:%'

;exit;
select id, left(title, 30) tit, length(`fullText`), left(`fullText`, 100), left(`introText`, 100)
    from spWaJ34_content 
    where `fullText` <> ''
;exit;
select * 
from (
  select id, c, tit, cx, substr(t, cx, locate('"', t, cx+6) + 1 - cx) r
    from ( select id, left(title, 30) tit, 1 + c *10 + d c, `introText` t,  char_length(substring_index(`introText`, 'href="', 1 + c *10 + d)) + 1 cx
        from spWaJ34_content 
        ,(
            select 0 c
            union all select 1 
            union all select 2 
            union all select 3 
            union all select 4
              ) c
        ,(
            select 0 d
            union all select 1 
            union all select 2 
            union all select 3 
            union all select 4
            union all select 5
            union all select 6
            union all select 7
            union all select 8
            union all select 9
              ) d
) s
    where cx > 0 and cx < char_length(t)
    order by id, cx
)r
where r not like 'href="http%'
    and r not like 'href="files/%'
    and r not like 'href="images/%'
    and r not like 'href="mailto:%'

;exit;

select id, cx, substr(t, cx, locate('"', t, cx+6) + 1 - cx)
    from ( select id, introText t,  locate('href="', introText) cx
        from spWaJ34_content 
     union all select id, introText t,  locate('href="', introText, locate('href="', introText)+6) cx
        from spWaJ34_content 

) s
    where cx > 0
    order by id, cx
;x;
    here locate('href="', introText) > 0
    , substring(introText, locate('href="', introText), locate('"', introText, locate('href="', introText)+6)+ 1 - ,50) 
    from spWaJ34_content
    here locate('href="', introText) > 0
;
select * 
from (
select 1 c
union all select 2
union all select 3) c
;