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

  • SEARCH
  • Home
  • 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 7620119
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T03:51:40+00:00 2026-05-31T03:51:40+00:00

I have a custom module in a D7 installation. In the submit function I’m

  • 0

I have a custom module in a D7 installation.

In the submit function I’m doing the following:

my_custom_block_get_form_submit($form, &$form_state) {

$d = db_insert('db_launch')
->fields(array(
'uniq' => $uniq
))
->execute();

After executing the code, I get no errors in the error log, and the sites returns the standard “This website has encountered an error”.

Does anyone have idea how I can debug this? I tried a try catch block but that didn’t return anything.

Thanks,

  • 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-31T03:51:42+00:00Added an answer on May 31, 2026 at 3:51 am

    To debug this code, you should try doing it this way:

    $query = db_insert('db_launch')
    ->fields(array(
    'uniq' => $uniq
    ));
    
    echo (string) $query ; // This will output your query that would be created with an insert.
    
    $d = $query->execute(); // and later on you can attach the output result.
    

    Note that, this will return the query with placeholders. If you wish to obtain the queries with actual values, you should have devel.module enabled and then:

    echo dpq($query) ; // This will output your query without placeholders
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a custom form implemented in a custom module in drupal 6. The
In a custom module nade_reg I have changed the registration form to include two
I have made up the custom module as : YUI.add('util', function(Y) { Y.namespace('com.myCompany'); var
i have a custom module with a form I have implemented form hooks like
I have a custom module I made for Magento. From the admin, there is
I have a custom module I made to show featured products on the homepage.
I have module that implements custom content type via NodeAPI hooks ( hook_insert ,
So I have a module in flex in which I add a custom component.
i have custom cell with 2 buttons(the function of these buttons is just to
I have custom drupal module. I receive result from a webservice that I need

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.