close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Error when I add recordset to email template

Thread began 8/14/2020 6:58 am by illbe322016 | Last modified 8/17/2020 10:15 am by Ray Borduin | 21 views | 2 replies |

illbe322016

Error when I add recordset to email template

My email template sends fine when I use just the standard template, when I add a recordset to the template I get:

Fatal error: Uncaught Error: Call to a member function query() on null in /homepages/23/d323639579/htdocs/pya-fbo/webassist/mysqli/rsobj.php:213 Stack trace: #0 /homepages/23/d323639579/htdocs/pya-fbo/webassist/email/templates/WebAssist-Block/Block_6.php(6): WA_MySQLi_RS->execute() #1 /homepages/23/d323639579/htdocs/pya-fbo/webassist/email/WA_Email.php(314): require('/homepages/23/d...') #2 /homepages/23/d323639579/htdocs/pya-fbo/webassist/email/WA_Email.php(473): WA_Email->getFromPage('webassist/email...') #3 /homepages/23/d323639579/htdocs/pya-fbo/fboConfirm.php(29): WA_Email->send(0) #4 {main} thrown in /homepages/23/d323639579/htdocs/pya-fbo/webassist/mysqli/rsobj.php on line 213

This happens even using a simple recordset.

I have included my template code WITH the recordset as an example.
I have tried removing the recordset PHP and only leaving the:

<?php require_once('../../../../Connections/QuoteConnectionNew_i.php'); ?>
<?php require_once('../../../../webassist/mysqli/rsobj.php'); ?>

and I get no errors and the email template sends

I'm not sure how I could have screwed this up :-), seems fairly straightforward.

Attached Files
Block_6.php
Sign in to reply to this post

Ray BorduinWebAssist

Add this on the top::

php:
<?php 

global $QuoteConnectionNew_i;
 
?>



This is a variable scoping issue. The require_once isn't adding it again since the main page already has the connection, but it isn't available either.

Using a global declaration makes the connection available for use on this page.

Sign in to reply to this post
Did this help? Tips are appreciated...

illbe322016

Great as usual!

Thank you Ray, that worked just fine.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...