Nested Menus

Victor Subervi victorsubervi at gmail.com
Tue Oct 13 15:00:01 EDT 2009


This is probably more appropriate for the MySQL list, but since this is
Dennis' pseudo-code...

Dennis wrote the following:

  cursor.execute("""create table if not exists Relationship
    (ID integer auto_increment primary key,
    Parent  integer not null,
    foreign key (Categories.ID),
    Child   integer not null,
    foreign key (Categories.ID),
    check (Parent <> Child) );"""    )

This code throws an error in MySQL around "Categories.ID". I have never
worked with foreign keys. It seems there should be a "references" statement
after that...but what does it reference? Also, why is it repeated twice?
TIA,
V

On Sat, Oct 10, 2009 at 1:58 AM, Dennis Lee Bieber <wlfraed at ix.netcom.com>wrote:

> On Fri, 9 Oct 2009 00:04:02 -0700 (PDT), r <rt8396 at gmail.com> declaimed
> the following in comp.lang.python:
>
> > This is not a personal attack on you but your writing style is so
> > horrendous i must at least notify you of it. Go to this link and view
> > your post in GG's and let me know what you think of it.
> >
>         This is the first time, in over a decade of Usenet posting, I've
> been accused of having a horrendous style... Occasional over-detailed
> technical harangues, perhaps -- often declared as such by me as a
> preface to the post itself.
>
> >
> http://groups.google.com/group/comp.lang.python/browse_thread/thread/6301372f8e581a74?hl=en#
>
>         What the web-based Google Groups does to a post is beyond my
> control. It is not a proper Usenet client. Though if it means anything,
> I did look at the post.
>
> >
> > As you can see the post is virtually impossible to read from the large
> > and seemingly random indenting and tabbing going on.(notwitstanding
>
>         Really? ~90% of my response was pseudo-Python code. If you hadn't
> noticed, Python uses indentation for structural elements -- so of course
> I'd use indentation. No randomness there. Did you want me to put long
> SQL statements as single line strings, exceeding common Usenet practice
> of ~76 characters per line, and letting the lines be wrapped by clients
> at truly indeterminate points?
>
>        Other than Google using a very large tab width on the indentation,
> the post looked perfectly fine to me; no confusing line wraps breaking
> otherwise syntactically valid lines -- one could cut&paste to a Python
> file and probably get very few syntax errors (since I wasn't trying to
> fully working code, just the conceptual pieces).
>
> > the bombastic verbosity and unbridled quoting). I have seen many posts
>
>         Out of ~176 lines (as reported by Agent's thread list) I count only
> 35 lines of quoted material. That is less than 20% of the total line
> count. That's a great improvement over the many influenced by M$
> Outlook, which promotes the unhealthy habits of top-posting and quoting
> of the entire message chain with no trimming of irrelevant text.
>
> --
>        Wulfraed         Dennis Lee Bieber               KD6MOG
>        wlfraed at ix.netcom.com   HTTP://wlfraed.home.netcom.com/
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20091013/dac57e88/attachment-0001.html>


More information about the Python-list mailing list