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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T16:42:17+00:00 2026-05-29T16:42:17+00:00

Can’t find the solution. I’m having the following stored procedure: CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_process_upload_log`(

  • 0

Can’t find the solution.
I’m having the following stored procedure:

CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_process_upload_log`(
inout prm_upload_id int,
prm_location_id integer,
prm_week_start integer,
prm_error_code integer,
prm_last_attempt_date integer,
prm_error_log_url varchar(256))
BEGIN 
select null from dual;
-- real impementation is ommited, it's not an issue, im sure
end

and corresponing php code:

  function update_log($conn, $upload_id, $location_id, $errcode, $att_date, $err_url) {
    $week = 1;
    $sql = "call sp_process_upload_log (:p0,:p1,:p2,:p3,:p4,:p5);";
    try {
      $stmt = $conn->prepare($sql);
      $stmt->bindParam(':p0', $upload_id, PDO::PARAM_STR|PDO::PARAM_INPUT_OUTPUT, 4000); 
      $stmt->bindValue(':p1', $location_id); 
      $stmt->bindValue(':p2', $week); 
      $stmt->bindValue(':p3', $errcode); 
      $stmt->bindValue(':p4', $att_date); 
      $stmt->bindValue(':p5', $err_url); 

        if ( ! $stmt->execute() ) {
          post_msg ("PDO Error: ".var_dump($stmt->errorInfo())."\n");
          return false;
        }
     } catch (PDOException $e) {
       post_msg ("Exception: " . $e->getMessage() . "\n");
       return false;
    }
    return $upload_id;
  }

//$conn variable is assigned with db connection resource properly
  $upload_id = update_log($conn, false, 1, false, time(), "someurl");

It fails with the error:

array(3) {
  [0]=>
  string(5) "42000"
  [1]=>
  int(1414)
  [2]=>
  string(125) "OUT or INOUT argument 1 for routine hex_tvdb.sp_process_upload_log is not a variable or NEW pseudo-variable in BEFORE trigger"
}

Even when trying to call for that stored procedure in MySQL Query Browser getting the same error.

  • 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-29T16:42:19+00:00Added an answer on May 29, 2026 at 4:42 pm

    Did you see this comment http://www.php.net/manual/en/pdo.prepared-statements.php#101993 ? See also http://forums.mysql.com/read.php?98,167022,222800#msg-222800.

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

Sidebar

Related Questions

Can somebody point me to a resource that explains how to go about having
Can anyone (maybe an XSL-fan?) help me find any advantages with handling presentation of
Can anyone give me an example of how to return the following json simply
Can anybody tell me a regular expression to use within some PHP to find
Can I be notified of the following events for an Activity: screenSizeWillChange screenSizeDidChange I
Can somebody give me advice on how to create a recursive version of GetEnumerator()?
Can anyone help me trying to find out why this doesn't work. The brushes
Can anybody tell what is the best(easy) way to sort the following string 'index'
Can someone guide me on a possible solution? I don't want to use /bin/cp
Can you guys help me understand a concept real quick, I'm having trouble understanding

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.