Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

Ver 8 why does not defined('DB_SHOUTBOX') work for me here?

Asked Modified Viewed 912 times
G
Grimloch
G
Energy can neither be created nor destroyed; only transformed !
  • Senior Member, joined since
  • Contributed 722 posts on the community forums.
  • Started 141 threads in the forums
  • Started this discussions
  • Answered 2 questions
asked
Senior Member

Explanation. Why won't this work in 8.00.50?
if (defined('DB_SHOUTBOX') && db_exists(DB_SHOUTBOX)) {
$result = dbquery("SELECT * FROM ".DB_SHOUTBOX."");
   if (dbrows($result) > 0) {
      $num_rows = dbrows($result);
        if ($num_rows) {
             $shouts = $num_rows;
         }
    }
} else { $shouts = 0; }

I have 2 shouts in the db.
Edited by Falk on 28-08-2020 14:36,
0 replies

2 posts

R
Anonymous User
R
Anonymous User 367
  • Veteran Member, joined since
  • Contributed 939 posts on the community forums.
  • Started 2 threads in the forums
  • Answered 20 questions
answered
Veteran Member

Please use Error log. Error says undefined DB_SHOUTBOX. V8 doesn't have autoloaded infusion_db.php.

Add this above your code
if (!defined("DB_SHOUTBOX")) {
 define("DB_SHOUTBOX", DB_PREFIX."shoutbox");
}
1 reply
C
Chan
C
Chan 0
Lead Developer of PHP-Fusion
  • Super Admin, joined since
  • Contributed 3,841 posts on the community forums.
  • Started 232 threads in the forums
  • Answered 6 questions
answered
Super Admin

Great site. Glad it worked for you.
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 2 posts
  • Votes 0 votes
  • Topic users 3 members

3 participants

C
C
Chan 0
Lead Developer of PHP-Fusion
  • Super Admin, joined since
  • Contributed 3,841 posts on the community forums.
  • Started 232 threads in the forums
  • Answered 6 questions
G
G
Energy can neither be created nor destroyed; only transformed !
  • Senior Member, joined since
  • Contributed 722 posts on the community forums.
  • Started 141 threads in the forums
  • Started this discussions
  • Answered 2 questions
R
R
Anonymous User 367
  • Veteran Member, joined since
  • Contributed 939 posts on the community forums.
  • Started 2 threads in the forums
  • Answered 20 questions

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet