I would like to mod scottro's fantastic mod (http://osticket.com/forums/showthread.php?t=4311) so that if a text phrase is used, it takes the next XX number of letters (for the serial number)
if (preg_match("/$Criteria/i", $email))
{
if( "$Action" == "deptId" )
{
$deptId=$Department;
}
elseif( "$Action" == "text" )
{
$qry = $email(where text phrase == phrase FROM `ost_ticket_rules` take the next phrase_XX);
// I know this is so wrong
// am just learning so any help would be awesome!!!
$result=mysql_query($qry);
}
elseif( "$Action" == "text" )
{
$staffId=$Staff;
$staffId=preg_replace( '/\n/', '', trim($staffId) );
$qry = sprintf("SELECT dept_id FROM `ost_staff` WHERE staff_id=$Staff;");
$result=mysql_query($qry);
while ( $row = mysql_fetch_assoc($result)){
$deptId=$row;
}
}
}
so if a new email contained SN/XXXXXX it would populate the additional feild SN with XXXXXX.
Thanks in advance
:)