Questions and discussion about using ProcessMaker: user interface, running cases & functionality

Moderators: ArturoRobles, ArturoRobles

#827485
while using below query for different workspace in plugin
Code: Select all
$date = date("Y-m-d h:i:s");
    $cnn = \Propel::getConnection(SYS_SYS);
    $stmt = $cnn->createStatement();
    if (@$is_created) {
        $query = "UPDATE PMT_BOOK SET TITLE = '$title', CREATED_AT = '$date', UPDATED_AT = '".$date."'  WHERE STATUS = 1";                
    } 
    $result = $stmt->executeQuery($query, ResultSet::FETCHMODE_ASSOC);
    return $result;
My Question is:
I'm getting the issue in this line $cnn = \Propel::getConnection(SYS_SYS);
#827487
Yes, I have found the issue. it was my mistake I have used to execute the query to select the records.
Since I was using like below code in my plugin config;
Code: Select all
$result = executeQuery("SELECT ID, TITLE FROM PMT_BOOK WHERE STATUS=1");
define('BOOK_TITLE', $result[1]['TITLE ']); 
I had multiple workspaces using the same plugin so I have got this error. I have declared as a constant so this error occurred
#827589
Yes, there is a limit to executeQuery() function. A large number of values cannot be used to update or insert via executeQuery() function. I have found in the processmaker source code. you can try this below code, it works well.
Code: Select all
$date = date("Y-m-d h:i:s");
    $cnn = \Propel::getConnection(SYS_SYS);
    $stmt = $cnn->createStatement();
    if (@$is_created) {
        $query = "UPDATE PMT_BOOK SET TITLE = '$title', CREATED_AT = '$date', UPDATED_AT = '".$date."'  WHERE STATUS = 1";                
    } 
    $result = $stmt->executeQuery($query, ResultSet::FETCHMODE_ASSOC);
    return $result;

Hi, Tell your error here. Please check the foll[…]

Hi, I have a process that works fine on 3.2.1 -com[…]

Hi, You must change your codes like this: func[…]

issue with processmaker 3.2

From what I understand, you want to incorporate th[…]