OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: Question about reading info from another table.

From: Rob Wultsch (wultschgmail.com)
Date: Thu Feb 28 2008 - 15:07:50 CST


If he is not sure what a join or primary key is then I do not think a
correct solution for anything he is working on would involve a
trigger. In October '07 Baron Schwartz said the following:
"I'm not an expert on them, but as a side note: I personally don't use
triggers in MySQL. I consider them rather poorly implemented in MySQL 5
and I'm afraid of them breaking replication, or doing something else I
don't like. When we took a look at them at my employer, we found basic
things wrong with them, like this:

http://bugs.mysql.com/bug.php?id=19686

Therefore I do not trust them at all, and that's why I don't know a
whole lot about how to use them :)"

Which is a good enough reason for me to not use them.

On Thu, Feb 28, 2008 at 1:10 PM, Lyons, Jim <jlyonshoovers.com> wrote:
> Jason Pruim wrote:
>
> > I am attempting to write a PHP application that reads info from a
> > MySQL database, and I'm wondering if I can set up a column in one
> > table that gets it's info from a field in another table automatically?
>
> > Ie:
>
> > Table1:
> > field1
> > field2
> > field3
>
> > Table2:
> > field4
> > field5
> > field6 = field1
>
> All the responses have approached this as a join problem. But if you
> want a field in a table to equal the data in a field in another table
> (field6 = field1) then perhaps what you really need is a trigger on
> Table2 that will grab data out of Table1 on insert into Table2, or
> change data in Table2 on update to Table1.
>
> Jim Lyons
>
>
> -----
> Jim Lyons
> MySQL DBA
> Hoover's, Inc.
> 512-380-4780
> jlyonshoovers.com
>
>
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/mysql?unsub=wultschgmail.com
>
>

--
Rob Wultsch
(480)223-2566
wultschgmail.com (email/google im)
wultsch (aim)
wultschhotmail.com (msn)

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