vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Question about Debug Mode (https://vborg.vbsupport.ru/showthread.php?t=123729)

afullcup 08-12-2006 12:24 AM

Question about Debug Mode
 
I'm sure this is going to sound stupid, but here goes...

After I turn on debug mode (as described here), WHERE do I see the debug messages?

I have written a rather large piece of code to include template and php and when I try to load the page, all I get is this:

Quote:

There seems to have been a problem with the A Full Cup database.
Please try again by clicking the Refresh button in your web browser.

An E-Mail has been dispatched to our Technical Staff, whom you can also contact if the problem persists.

We apologise for any inconvenience.
I can strip it down to bare bones and it loads fine, but SOMETHING in my code is wrong (obviously) and I don't know how to figure out where! help :)

Code Monkey 08-12-2006 12:40 AM

At the bottom of the page.

Oh, I see. Debug mode isn't going to help with database errors. Yoy need to post some code so we can see what is wrong.

Paul M 08-12-2006 01:16 AM

You need to post the actual SQL error message, which should be visible to admins running the page, should also be e-mailed to you (or you can right click on the error page and view source).

afullcup 08-12-2006 01:24 AM

well, I got past that database error above, but now I have another database/code issue... Here's my code segment...

PHP Code:

        $query_string =  "SELECT rebate_id, product, rebate_type, max_value, exp_date
                FROM " 
TABLE_PREFIX "rebate 
                
$query_sort
                LIMIT 
$limitlower, " $viewrebates['perpage'] . "";

        echo 
"query:  $query_string";

        
$rebate_list $vbulletin->db->query_first($query_string);

        while (
$rebate $vbulletin->db->fetch_array($rebate_list))
        {
           echo 
"in while <BR>";
           echo 
$rebate[product];
           echo 
$rebate[rebate_type];
        } 

The query_string is fine - I can run the resulting query on my database directly and get rows back. However, I never get "in while". Am I fetching the array wrong?

answered my own question, sorry.... had query_first instead of query_read. it's late, what can i say. :)

thanks ya'll. :)

Paul M 08-12-2006 01:28 AM

You don't need "$vbulletin->db->query_first", instead use "$vbulletin->db->query_read".


All times are GMT. The time now is 01:46 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01741 seconds
  • Memory Usage 1,723KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete