Database - functionality for front end application

Monte Goulding monte at sweattechnologies.com
Mon Nov 17 17:52:37 EST 2003


> People Table
> -----------------
>
> Pid  <unique primary key>
> FirstName
> LastName
> Affiliation
> CompanyName < a display only field>
> Last_update
>
>
> Business Table
> -------------------
>
> Bid <unique primary key>
> Org_Name
> Address
> City
> State
> Zip
> Last_update
>
> =======================================
>
>
> Problem One: Posting of results from "lookup" query
> -------------------
>
> Whenever a new row is displayed (via Query, Next or Previous calls), or
> whenever an entry or modification is made to the form's
> Affiliation field, I
> wish to automatically populate the form's (display only)
> CompanyName field
> with the results of the following SQL query:
>
> select Org_Name from Business where Bid = "<value of the form's currently
> displayed affiliation field>"
>
> How can this best be accomplished in Revolution?
>
With one properly formed SQL query instead of 2. Something like:

SELECT Pid,FirstName,LastName,Org_Name,People.Last_Update FROM
People,Business WHERE Affiliation = Bid

Cheers

Monte



More information about the use-livecode mailing list