This is probably more appropriate for the MySQL list, but since this is Dennis' pseudo-code...<br><br>Dennis wrote the following:<br><br>  cursor.execute("""create table if not exists Relationship<br>    (ID integer auto_increment primary key,<br>
    Parent  integer not null,<br>    foreign key (Categories.ID),<br>    Child   integer not null,<br>    foreign key (Categories.ID),<br>    check (Parent <> Child) );"""    )<br><br>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?<br>
TIA,<br>V<br><br><div class="gmail_quote">On Sat, Oct 10, 2009 at 1:58 AM, Dennis Lee Bieber <span dir="ltr"><<a href="mailto:wlfraed@ix.netcom.com">wlfraed@ix.netcom.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Fri, 9 Oct 2009 00:04:02 -0700 (PDT), r <<a href="mailto:rt8396@gmail.com">rt8396@gmail.com</a>> declaimed<br>
the following in comp.lang.python:<br>
<div class="im"><br>
> This is not a personal attack on you but your writing style is so<br>
> horrendous i must at least notify you of it. Go to this link and view<br>
> your post in GG's and let me know what you think of it.<br>
><br>
</div>        This is the first time, in over a decade of Usenet posting, I've<br>
been accused of having a horrendous style... Occasional over-detailed<br>
technical harangues, perhaps -- often declared as such by me as a<br>
preface to the post itself.<br>
<div class="im"><br>
> <a href="http://groups.google.com/group/comp.lang.python/browse_thread/thread/6301372f8e581a74?hl=en#" target="_blank">http://groups.google.com/group/comp.lang.python/browse_thread/thread/6301372f8e581a74?hl=en#</a><br>

<br>
</div>        What the web-based Google Groups does to a post is beyond my<br>
control. It is not a proper Usenet client. Though if it means anything,<br>
I did look at the post.<br>
<div class="im"><br>
><br>
> As you can see the post is virtually impossible to read from the large<br>
> and seemingly random indenting and tabbing going on.(notwitstanding<br>
<br>
</div>        Really? ~90% of my response was pseudo-Python code. If you hadn't<br>
noticed, Python uses indentation for structural elements -- so of course<br>
I'd use indentation. No randomness there. Did you want me to put long<br>
SQL statements as single line strings, exceeding common Usenet practice<br>
of ~76 characters per line, and letting the lines be wrapped by clients<br>
at truly indeterminate points?<br>
<br>
        Other than Google using a very large tab width on the indentation,<br>
the post looked perfectly fine to me; no confusing line wraps breaking<br>
otherwise syntactically valid lines -- one could cut&paste to a Python<br>
file and probably get very few syntax errors (since I wasn't trying to<br>
fully working code, just the conceptual pieces).<br>
<div class="im"><br>
> the bombastic verbosity and unbridled quoting). I have seen many posts<br>
<br>
</div>        Out of ~176 lines (as reported by Agent's thread list) I count only<br>
35 lines of quoted material. That is less than 20% of the total line<br>
count. That's a great improvement over the many influenced by M$<br>
Outlook, which promotes the unhealthy habits of top-posting and quoting<br>
of the entire message chain with no trimming of irrelevant text.<br>
<div><div></div><div class="h5"><br>
--<br>
        Wulfraed         Dennis Lee Bieber               KD6MOG<br>
        <a href="mailto:wlfraed@ix.netcom.com">wlfraed@ix.netcom.com</a>   <a href="HTTP://wlfraed.home.netcom.com/" target="_blank">HTTP://wlfraed.home.netcom.com/</a><br>
--<br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
</div></div></blockquote></div><br>