OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: One to many relationship

From: Martijn Tonies (m.toniesupscene.com)
Date: Mon Apr 06 2009 - 03:03:42 CDT


Hi,

>I'm trying to design a relational database where two tables link to each
>other through unique id sa below
>Table 1
>table1_id INT UNSIGNED NOT NULL AUTO INCREMENT,
>entrydate TIMESTAMP
>
>Table2
>table2_id INT UNSIGNED NOT NULL AUTO_INCREMENT,
>table1_id INT UNSIGNED NOT NULL,
>entrydate TIMESTAMP,
>
>Sorry. The above is just a rough sketch of what I have here and I hope you
>understand what I'm trying to portray but the value of >table1_id inside
>table2 keeps returning the value 0 thereby it doesn't correspond with any
>value in table1_id in table1.
>Please I need help on this issue.
>Thanks in anticipation of your prompt response.

Are you actually -filling in- the "table1_id" in "table2"? If not, do you
think
it will magically appear with the right value from "table1"? How should
that happen?

With regards,

Martijn Tonies
Upscene Productions
http://www.upscene.com

Download FREE Database Workbench Lite for MySQL!

Database questions? Check the forum:
http://www.databasedevelopmentforum.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql