Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2007
    Posts
    169
    Plugin Contributions
    0

    Default $db->Execute throwing error

    Does $db->Execute does not work when called from some locations?

    I wrote a custom function in ...
    includes/functions/extra_functions/myfunction.php

    I'm calling this function from ...
    includes/english/html_includes/mytemplate/define_main_page.php

    The function is throwing this error in the line "$db->Execute" ...

    Fatal error: Call to a member function on a non-object in


  2. #2
    Join Date
    Jan 2007
    Posts
    169
    Plugin Contributions
    0

    Default Re: $db->Execute throwing error

    Nevermind. I forgot to put "global $db" in the function. Otherwise this works fine.

 

 

Similar Threads

  1. my Custom code is throwing an error
    By tcarden in forum General Questions
    Replies: 1
    Last Post: 31 Jan 2013, 12:45 AM
  2. Replies: 2
    Last Post: 21 Jul 2010, 05:02 PM
  3. Updating Customer Orders Throwing an error
    By Mike_Dean in forum General Questions
    Replies: 5
    Last Post: 14 Aug 2009, 09:57 PM
  4. Define Pages Editor throwing error
    By micadelic in forum General Questions
    Replies: 4
    Last Post: 13 Aug 2009, 12:39 PM
  5. paypal express throwing PHP error?
    By SarahL in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 1 Nov 2007, 02:38 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg