Nick,

> I don't think ...
> Am I talking rubbish?

An admission and then an invitation??? Boy you must some masochist!

You asked a question, it was answered (and there's usually more than one way to skin 
the proverbial cat); and
then you appear to argue.

"Thinking" is not as good as "testing": did you test before 'arguing'?

RTFM: 6.4.3  INSERT Syntax with a view to the author table handling.

- either use the IGNORE facility, or if you want to know if the author already exists 
'on file' then do a SELECT
first - or if you are interfacing into MySQL from a programming/scripting language, 
use that facility to observe
the INSERT post-fact.

No you're not talking (total) rubbish: the structure looks good, and the question was 
sensible. Do a bit more
reading about SQL techniques, and MySQL syntax; get into the habit of trying things 
out for yourself using a
management tool or the MySQL command line, and it'll soon come together in your mind!

Recommendation: treat the (possible) addition to the author tbl as one task, and the 
(required in both cases)
addition to the content tbl as a separate task.

Regards,
=dn


> * and then Diana Soares declared....
> > On Wed, 2002-02-06 at 11:22, Nick Wilson wrote:
> > > 2 tables
> > > content ---- TipId | AuthId | title | keywords | desc | section | text
> > > author  ---- AuthId | name | email | bio
> > >
> > > My question is: If I enter a 'tip' and put myself as the author, when
> > > /I/ come to write another tip how do I make my query avoid  putting
> > > another entry in author? I'll be using PHP for the front end.
> >
> > You can always use INSERT for the "content" table and REPLACE for the
> > "author" table.
>
> I don't think that would work as it will change the AuthId and effect
> any other 'tips' I've written.
> Each author should have one entry in 'author' and as many in 'content'
> as tips they have written.
>
> Am I talking rubbish?
> - --



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to