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 7900527
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T08:59:35+00:00 2026-06-03T08:59:35+00:00

I am getting the follwing message returned to me Fatal error: Call to a

  • 0

I am getting the follwing message returned to me

Fatal error: Call to a member function fetch() on a non-object when running the following. It seems sporadic though, any thoughts?

    $cc_transaction_conn = new PDO('mysql:host='.$server.';dbname='.$db2use, $dbuser, $dbpass);
    $cc_transaction_query = $cc_transaction_conn->query("CALLgenInsCCTransactionLog('".$vmcnum."',
                                                                                     ".$_SESSION[val].",
                                                                                    'Enrollment',
                                                                                    'Processor',
                                                                                    'Merchant',
                                                                                    'Auth',
                                                                                    '".$card_expiration_month."',
                                                                                    '".$card_expiration_year."',
                                                                                    ".$_SESSION[enrollment_fee].",
                                                                                    '".strtoupper($_SESSION[forename])."',
                                                                                    '".strtoupper($_SESSION[surname])."',
                                                                                    '".strtoupper($_SESSION[house_number])."',
                                                                                    '".strtoupper($_SESSION[street])."',
                                                                                    '".strtoupper($_SESSION[flat_number])."',
                                                                                    '".strtoupper($_SESSION[town])."',
                                                                                    '".strtoupper($billing_post_code)."',
                                                                                    '".$ip_address."',
                                                                                    @cc_insert_id)");
        $cc_transaction_result = $cc_transaction_query->fetch();
        $cc_insert_id = $cc_transaction_result['cc_insert_id'];
        $_SESSION[cc_insert_id] = $cc_insert_id;
        $cc_transaction_conn = NULL;

Here is the stored procedure:

    CREATE DEFINER=`reliantuksite`@`%` PROCEDURE `genInsCCTransactionLog`(
                        vmc VARCHAR(16),
                        application_id INT UNSIGNED,
                        reas_description VARCHAR(50),
                        in_processor_name VARCHAR(50),
                        merc_name VARCHAR(50),
                        trans_type_description VARCHAR(50),
                        card_expiration_month VARCHAR(2),
                        card_expiration_year VARCHAR(4),
                        amount DECIMAL(6,2),
                        forename VARCHAR(50),
                        surname VARCHAR(50),
                        house_number VARCHAR(255),
                        street VARCHAR(255),
                        flat_number VARCHAR(75),
                        town VARCHAR(50),
                        postal_code VARCHAR(10),
                        ip_address VARCHAR(32),
                        OUT cc_insert_id INT)
    BEGIN

    DECLARE proc_id TINYINT;
    DECLARE pay_reason_id TINYINT;
    DECLARE merc_account_id INT;
    DECLARE trans_type_id TINYINT;
    SELECT processor_id INTO proc_id FROM cc_processor WHERE processor_name = in_processor_name;
    SELECT payment_reason_id INTO pay_reason_id FROM payment_reason WHERE reason_description = reas_description;
    SELECT merchant_account_id INTO merc_account_id FROM cc_merchant_account WHERE merchant_name = merc_name;
    SELECT transaction_type_id INTO trans_type_id FROM transaction_type WHERE transaction_type_description = trans_type_description;
    INSERT INTO
        cc_transaction_log 
            (transaction_sent_date,
            vmc_number,
            application_id,
            processor_id,
            payment_reason_id,
            merchant_account_id,
            transaction_type_id,
            card_expiration_month,
            card_expiration_year,
            amount,
            billing_forename,
            billing_surname,
            billing_house_number,
            billing_street,
            billing_flat_number,
            billing_town,
            billing_postal_code,
            host_ip)
    VALUES
        (NOW(),
        vmc,
        application_id,
        proc_id,
        pay_reason_id,
        merc_account_id,
        trans_type_id,
        card_expiration_month,
        card_expiration_year,
        amount,
        forename,
        surname,
        house_number,
        street,
        flat_number,
        town,
        postal_code,
        ip_address);
    SELECT LAST_INSERT_ID() INTO cc_insert_id;
    SELECT cc_insert_id;
END;;
  • 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-06-03T08:59:37+00:00Added an answer on June 3, 2026 at 8:59 am

    PDO::query(), as written in the manual, can return a PDOStatment object or FALSE if the query fails. If you try to call a methot on a non-object – FALSE, ofcourse it will fail producing the error message that you are getting.

    So, check if the query() result isn’t false, then call fetch() on it.

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

Sidebar

Related Questions

I am getting the following error message: Method range of object _worksheet failed when
I am getting following error message: java.lang.IllegalStateException: Neither BindingResult nor plain target object for
Am getting following error message on calling WCF service: The formatter threw an exception
I am getting following error message when using Doctrine ORM in Codeigniter. ( !
I'm getting the following message in my users' crash logs: Dyld Error Message: Symbol
I'm getting the following error message and I can't seem to figure out the
I keep getting the following error message ERROR 1064 (42000): You have an error
I'm getting the following the error message in my content delivery logging: com.tridion.smarttarget.utils.AmbientDataHelper -
I am getting the following error message in my FF console: uncaught exception: Syntax
I am getting a '401 - Not Authorized' error message returned when I attempt

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.