Jump to content

Code Modification Required


CWT
Go to solution Solved by CWT,

Recommended Posts

I use a RAD called PHPRunner to build Database Applications.

One of the snippets of code I use a lot is to insert a Field Value from a Master Table into an equivalent Field in a Child Table as a "Before Add Event", is as follows: - 

global $dal;

$tblDetail = $dal->Table("tblUserRequests");

$tblDetail->Value["ID"] = $data["ID"];

$tblDetail->Param["ID"] = $data["ID"];

$tblDetail->Update();

unset($data["ID"]);

What I would like is help from someone to modify this code so that I can insert 2 or more Field Values in the same operation. So as well as inserting the Value "ID" into the Child Table I can also insert the Value "client". 

Many thanks for reading.

Carl. 

 

 

Link to comment
Share on other sites

I think you would need to modify the Update function to achieve your wish.  What you are showing us is the setup steps only.  The Update function would need a change to accept a new parameter and a change to the query that gets run by Update to accomodate a new setup field.

Have at it!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.