Greetings,
I am creating a function in table delegate class for file validation, but after submission of form while editing record, I am getting the "Permission Denied Error". The function I have write is:
function workPlan__validate(&$record,$value,&$params)
{
$app =& Dataface_Application::getInstance();
$query =& $app->getQuery();
if($value['name'] == NULL)
{
$appid = $record->val('id');
$res = mysql_query("select workPlan from applications where id = '".$appid."'", df_db());
if (!$res ) throw new Exception(mysql_error(df_db()));
$data = mysql_fetch_array($res);
if(empty($data[0]))
{
return (PEAR::raiseError("Please upload workplan",DATAFACE_E_NOTICE));
}
}
}
kindly lead me.