Support » Plugin: PHP Code Widget » getting SQL error. See 'logs/mysql.log' when using include

  • Resolved charles_i

    (@charles_i)


    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/

Viewing 1 replies (of 1 total)
  • Plugin Author Samuel Wood (Otto)

    (@otto42)

    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.

Viewing 1 replies (of 1 total)
  • The topic ‘getting SQL error. See 'logs/mysql.log' when using include’ is closed to new replies.