This topic is locked

EditOnload using Oracle database

5/14/2007 8:38:05 AM
PHPRunner General questions
D
dcrera author

Hi,
I am trying to display a description from another file using the key of the Edit form
function EditOnLoad()

{

global $where;
// Parameters:

// $where - string with WHERE clause pointing to record to be edited

//** Check if specific record exists ****

global $conn;

$strSQLExists = "select * from ellipse.msf541 where request_id ='".$where["DA_NUMBER"]."'";$rsExists = db_query($strSQLExists,$conn);

$data=db_fetch_array($rsExists);

if($data)

{

echo $data("SHORT_DESC_1");
}

else

{

echo $where;

}
return true;

//** Custom code ****

// put your custom code here

}
In this case DA_NUMBER is the key field
How do I reference this field ?
I tried $where which does not work.
The echo statement shows : "FORMS"."MSFDE1_ESTIMATE"."DA_NUMBER"='E0007675'
Thanks

Alexey admin 5/14/2007

Hi,
use this line in your code:

$strSQLExists = "select * from ellipse.msf541 where request_id ='".$_REQUEST["editid1"]."'";

D
dcrera author 5/14/2007

Hi,
Thanks, it works.