|
Home > Archive > MySQL Server Forum > June 2005 > Any Ideas about that ...
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Any Ideas about that ...
|
|
| Angelos 2005-06-16, 3:23 am |
| Hello ...
I have a table Products and a table Files.
Each product may have from 0 to 10 or more files associated with it. So it
is a 1 to M relationship...
My problem is that I cannont see how I can associate files to the product at
the time of Product insertion to the DB.
And this is because I don't know the ID taht the product is going to take
before it is inserted into the DB.
So any IDEAS ?
Thanks Angelos
| |
|
|
| Angelos 2005-06-16, 11:23 am |
| > And the id last_insert_id() returns is safe to use even with many users,
> because it is attached to the current connection. So user with another
> connection wont get the id you used in another connection.
> PHP:
> http://fi2.php.net/manual/fi/functi...l-insert-id.php
THanks a lot man ....
Thats great news !!!!
|
|
|
|
|