WordPress.org

Ready to get started?Download WordPress

Forums

PHP Code Widget
[resolved] getting SQL error. See 'logs/mysql.log' when using include (2 posts)

  1. charles_i
    Member
    Posted 11 months ago #

    I'm trying to add an include to a mini-calendar in my sidebar. My theme is called "scoop" and this is the correct path to the php file that runs the mini-calendar but when I enter this:

    include (ABSPATH . '/wp-content/themes/scoop/calendar/lcsbar.php');

    I get this result:

    SQL error. See 'logs/mysql.log'

    However if I enter the URL to the entire path with my domain name where ABSPATH is I can see the mini-calendar is there.

    How can I get the include to work?

    Thanks
    Charles

    http://wordpress.org/plugins/php-code-widget/

  2. Samuel Wood (Otto)
    Tech Ninja
    Plugin Author

    Posted 10 months ago #

    The include works fine. But your code in that file might be assuming that it is running in a global context instead of in a function context.

Reply

You must log in to post.

About this Plugin

About this Topic