Try turning your thinking the other way around and you will  make life a
little easier for yourself.

Have a tblProject table with projectId as the primary key. You can have as
many other fields for whatever data you want to store.

Then have a tblBids table, having it's own primary key bidId. It then has a
second field projectId that becomes the link between the two tables. You can
have whatever other fields you need to store your bid details following
that.

You can then do whatever you want. You might want to display a list of
projects from tblProject ("SELECT * FROM tblProject") and then if a project
link is clicked on, list all of the bids relating to that project ("SELECT *
FROM tblBid WHERE projectId = " & intProjectID & ";" or whatever syntax for
whatever scripting language you are using).

Hope this helps. If you are using ASP I can drop you some samples of pages
that do that. If you aren't, you'll need to chase up the details youself.

Regards,

G.


> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, 25 January 2001 16:06
> To: [EMAIL PROTECTED]
> Subject: Ideas??
>
>
> Hi,
>
> I am creating a web site which allows users to post projects and
> then others
> to place bids. I am setting up two tables in MySQL 'Projects' & 'Bids' my
> problem is how best to cross reference. What I was thinking of doing is
> creating a number of fields in the Projects table...
>
> Bid1
> Bid2
> Bid3
> etc
>
> and then inserting the BidID from the bids table into Bid1, and
> if that is
> already used then it will go into Bid2. But how many Bid# shall I
> create??
> I`m sure there must be a faster method than this, anyone have any
> suggestions??
>
> TIA
> Ade
>
> ---------------------------------------------------------------------
> 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


---------------------------------------------------------------------
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