Jump to content


Pointers In MySQL? Possible?

  • Please log in to reply
1 reply to this topic

#1 JustinK101

  • Members
  • PipPipPip
  • Advanced Member
  • 503 posts
  • LocationSan Diego, California, US

Posted 04 May 2006 - 05:19 PM

Is it possible to have a field in mysql that simply points to another field in a completely different table?

So, for example:

field: first_name | varchar(50)

field: first_name | table1.first_name

That way when the field in the other table gets modified the field in the new table gets updated automatically. This would be very useful for me. Thanks!

#2 ober

  • Staff Alumni
  • Advanced Member
  • 5,337 posts
  • LocationEast Coast, USA

Posted 04 May 2006 - 07:58 PM

I'm unsure why you would want to do something like that. Storing the same data in 2 places means that your database isn't normalized.

However, you could create a VIEW that would meet your criteria.

Info: PHP Manual

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users