Re: Question about reading info from another table.

2008-02-28 Thread Rob Wultsch
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

Re: Question about reading info from another table.

2008-02-28 Thread Lyons, Jim
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 >

Re: Question about reading info from another table.

2008-02-28 Thread Rob Wultsch
I was referering to what you sent into the mysql user list. Descriptive table/columns are ideal in production. When asking for assistance it is ideal to remove extraneous detail. On Thu, Feb 28, 2008 at 12:18 PM, Jason Pruim <[EMAIL PROTECTED]> wrote: > > On Feb 28, 2008, at 2:06 PM, Rob Wultsch

Re: Question about reading info from another table.

2008-02-28 Thread Jason Pruim
On Feb 28, 2008, at 2:06 PM, Rob Wultsch wrote: What you are probably wanting is a join, but how does adminAll relate to current? adminAll will be for the administrators of my program to log into so instead of getting redirected automatically to a certain table (current.tableName in this

Re: Question about reading info from another table.

2008-02-28 Thread Rob Wultsch
What you are probably wanting is a join, but how does adminAll relate to current? Generally it is a good idea to have the column that relates the tables (read http://en.wikipedia.org/wiki/Foreign_key if you want to work at a much high level ) have the same column name if possible (IMHO). In the ex

Re: Question about reading info from another table.

2008-02-28 Thread Jason Pruim
On Feb 28, 2008, at 1:29 PM, Rob Wultsch wrote: On Thu, Feb 28, 2008 at 10:59 AM, Jason Pruim <[EMAIL PROTECTED]> wrote: Hi Everyone, 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

Re: Question about reading info from another table.

2008-02-28 Thread Rob Wultsch
On Thu, Feb 28, 2008 at 10:59 AM, Jason Pruim <[EMAIL PROTECTED]> wrote: > Hi Everyone, > > 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 automaticall