Reply to Re: Pull data from Two tables

Your name:

Reply:


Posted by Greg D. Moore \(Strider\) on 08/23/05 02:36

"cvillard" <cvillard@gmail.com> wrote in message
news:1124752154.644452.160570@f14g2000cwb.googlegroups.com...
> Thank you for the feedback, obviously your a genius, but I do not know
> what to post since I already stated I am new to this. My question was
> of a theory nature, as I do not know what DRI and contraints are.
>

DRI=Data Referential Integrity.

The important part is DDL - Data Definition Language.

What we need is the script to create your tables.

Something lie

CREATE TABLE cases (
case varchar(30),
case_id int
)

CREATE TABLE email (
case_id int,
case_email varchar(30)
)

DRI would include keys to make sure you can't have a case_id in email table
that doesn't exist in table cases, that case_email has a valid form, etc.

So, now

sounds like you want something like

select e.case_email from email as e inner join cases as c on
e.case_id=c.cases_id where e.case_id = 5

> I will try to simply my question even more...
>
> 1. I have a database with two tables Case and Users
> 2. When I finish updating a case I want to send an email to the
> currently assigned users.
> 3. The email address is not stated in the Case table, so I would like
> to know if there is a way when I guery the database I can also pull
> data from another Table.
>

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация