Questions and discussion about using ProcessMaker: user interface, running cases & functionality
#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;

A 1xbet clone script is a pre-designed software so[…]

4rabet clone script is enabling entrepreneurs to e[…]

Parimatch clone script is enabling entrepreneurs t[…]

In the world of cryptocurrency, a wallet is an app[…]