Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • One option would be to build SQL for a self-join at run-time.

    So /alpha/beta/ would produce a query:

    select f2.id
    from foo f1, foo f2
    where f1.parent = 0 and f1.name = 'alpha'
        and f2.parent = f1.id and f2.name = beta'

    This won't work if the path can have extra information after the structure. eg. /alpha/beta/productid/add

    If the tree can be deeply nested, I'd go for a different data structure.

    • Yes! :-) When you have three, four or more nested parts you get too complicated SQL query which is very good for making DDOS attacks with wrong URLs.