gigperfect

  •  ·  Standard
  • 1339 views
Friends
Empty
Add new...
 
 
·
Added a discussion

Howdy,

I'm a bit lost in terms of using the database connection class.

I have this working in PDO:

function run_sql_test_pdo($pdo, $user_id, $recepient_id){
$stmt = $pdo->prepare('SELECT lot_id, user_id
FROM final_folly.bx_messenger_jots
WHERE user_id = ? OR user_id = ?
ORDER BY lot_id ASC');
$stmt->execute([$user_id, $recepient_id]);
$result = $stmt->fetchAll();
}

But translating the function into the DB class used by UNA is proving to be of some difficulty. I'm guessing it's something like this:

 $sSql = $aObject::getAll("SELECT lot_id, user_id FROM final_folly.bx_messenger_jots WHERE user_id = 1");

But it's even not close. Getting this error:

E_NOTICE Error in file »BxDolConnection.php« at line 271: Undefined variable: aObject Fatal error: Uncaught Error: Class name must be a valid object or a string in /var/www/html/inc/classes/BxDolConnection.php:271 Stack trace: #0 /var/www/html/inc/classes/BxDolConnection.php(213): BxDolConnection->_action('9', 3, 'addConnection', '_sys_conn_err_c...', true) #1 /var/www/html/conn.php(24): BxDolConnection->actionAdd() #2 {main}  thrown in /var/www/html/inc/classes/BxDolConnection.php on line 271 E_ERROR Error in file »BxDolConnection.php« at line 271: Uncaught Error: Class name must be a valid object or a string in /var/www/html/inc/classes/BxDolConnection.php:271 Stack trace: #0 /var/www/html/inc/classes/BxDolConnection.php(213): BxDolConnection->_action('9', 3, 'addConnection', '_sys_conn_err_c...', true) #1 /var/www/html/conn.php(24): BxDolConnection->actionAdd() #2 {main}  thrown 

Any ideas? Any advice on these database handlers functions? 

  • 1308
·
Added a discussion

Hi Community,

I'm trying to get UNA to work with Amazon SES which is an smtp email service. 

I know my host, username, password and port settings. 

Just trying to find out where to put them into PhpMailer so they're activated for the website. 

Php mailer offers the following example config in it's readme:

try {

    //Server settings

 //   $mail->SMTPDebug = 2;                                 // Enable verbose debug output

    $mail->isSMTP();                                      // Set mailer to use SMTP

    $mail->Host = '';  // Specify main and backup SMTP servers

    $mail->SMTPAuth = true;                               // Enable SMTP authentication

    $mail->Username = '';                 // SMTP username

    $mail->Password = '';                           // SMTP password

    $mail->SMTPSecure = 'tls';                            // Enable TLS encryption, `ssl` also accepted

    $mail->Port = 587;                                    // TCP port to connect to

}

Any ideas where to copy/paste this info into UNA? 

  • 1464
gigperfect Discussions
Using getAll() in BxDolConnection.php
SMTP mail configuration