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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T19:55:48+00:00 2026-06-15T19:55:48+00:00

I have a PHP script with the following lines: require_once ‘meekrodb.2.1.class.php’; DB::$user = ‘usr’;

  • 0

I have a PHP script with the following lines:

require_once 'meekrodb.2.1.class.php';
DB::$user = 'usr';
DB::$password = 'pwd';
DB::$dbName = 'db';
DB::$encoding = 'utf8';

$results = DB::queryFirstField("
    CALL getSequence('time_id', %i); // ***** Stored procedure call *****
", TENANT_ID);

DB::insert('timeentry', array(
    'tenant_id' => TENANT_ID,
    'time_id' => $results,
    'timestart' => DB::sqleval("now()"),
    'assig_id' => $assig_id
));

I am getting the following error:

QUERY: INSERT INTO timeentry (tenant_id, time_id, timestart, assig_id) VALUES (1, ’42’, now(), ‘1’)

ERROR: Commands out of sync; you can’t run this command now

If I replace the call to the stored procedure with a SELECT statement, everything works fine.

$results = DB::queryFirstField("
    SELECT 45; // ***** SELECT statement *****
");

DB::insert('timeentry', array(
    'tenant_id' => TENANT_ID,
    'time_id' => $results,
    'timestart' => DB::sqleval("now()"),
    'assig_id' => $assig_id
));

I have not analyzed the internals of the MeekroDB Library (http://www.meekro.com).

I tried wrapping each statement in a transaction but I get the same error when COMMIT is executed right after the call to the stored procedure.

Any help is greatly appreciated.

  • 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-15T19:55:49+00:00Added an answer on June 15, 2026 at 7:55 pm

    Calls to stored procedures in MySQL produce multiple result sets. That is, a stored proc might have more than one SELECT, so the client has to iterate through several result sets to finish processing the CALL.

    See examples in the answer to this question: Retrieving Multiple Result sets with stored procedure in php/mysqli

    Until all results from the CALL are finished, it isn’t considered closed, and MySQL does not permit you to run another query before the current query is completely finished.

    I don’t know the MeekroDB library well, but glancing at the online docs I don’t see any way to iterate through multiple result sets. So there may not be any way to call stored procedures safely. I suggest you contact the author for specific support: http://www.meekro.com/help.php.

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

Sidebar

Related Questions

i have the following simple script <input class=input type=text name=password style=color: #797272; value= <?php
I have a php script that has the following requirement command: require_once 'HTTP/OAuth.php'; the
I have a form that submits user inputs to the following php script (i've
i have following lines included at the bottom of my index.php: <script type=text/javascript language=javascript
I have the following PHP script: <?php $vote_type = $_GET['type']; $book = $_GET['book']; $id
I have the following PHP script with the working (according to JsonViewer ) JSON
I have the following PHP script: <?php $fortune = `fortune`; echo $fortune; ?> but
I have a PHP script that does the following: Uses file_get_contents() to get content
I have the following situation. I have a PHP script that imports a CSV
I have the following script validation.php <?php if(!isset($_SESSION['userId'])){ session_destroy(); header('Location: home.php'); exit; } ?>

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.