Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 652783
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T22:18:37+00:00 2026-05-13T22:18:37+00:00

when it gives a error I want him to do 2 things. echo nl2br($qVraagOp);

  • 0

when it gives a error I want him to do 2 things.

  1. echo nl2br($qVraagOp);
  2. mysql_error();

so i thougth:

$rVraagOp = mysql_query( $qVraagOp ) or die( echo nl2br($qVraagOp); mysql_error(); );

I can write a function that does these two things and then call that but that a bit redundant.
is there a other way?

Matthy

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T22:18:37+00:00Added an answer on May 13, 2026 at 10:18 pm

    I would write a function like:

    function PrintDebug($DebugData)
    { 
      if($DebugMode == 1)
      { 
          return nl2br($DebugData) . "<br />" . mysql_error();
      }
      else
      {
          return "Ops stuff got messed up!!!";
      }
    } 
    

    And I would use it like

    $rVraagOp = mysql_query( $qVraagOp ) or die(PrintDebug($qVraagOp));
    

    It’s your job to save the debug status in a DB(think is maintenance mode active or not) and logging to a file would be helpful too. Also I want to point out that I didn’t tested it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using log4net. When Application gives an error, I want to send e-mail
I want to pass cordinates to default blue blob of mapkit.but it gives error?
I want to do this, but it gives error :( for better understanding my
I want to use datetimepicker but it gives error : TypeError: Object # has
This function gives error: function RefreshGrid(){ window.location.href=Form_ElameMamoreBazdid.aspx; }
the second function gives error C2803 http://msdn.microsoft.com/en-us/library/zy7kx46x%28VS.80%29.aspx : 'operator ,' must have at least
I have following asp.net code but it gives error when I change dropdown selected
The offending line str.replace(/ /g, ) gives Error: In orders.js.erb.coffee, Parse error on line
How could i validate a textbox in vb.net, so that it gives error message
the code below gives compilation error when I try to create test t[2]; because

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.