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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T00:44:07+00:00 2026-06-18T00:44:07+00:00

I use the following code to retrieve data from sql in php if ($q=$db->prepare(call

  • 0

I use the following code to retrieve data from sql in php

if ($q=$db->prepare("call p_test(?)")){
    $q->bind_param('s',$token);
    $q->execute();

    $q->bind_result($r1, $r2, $r3);

    if ($q->fetch()){
        echo $r1.
    }
}

above code works fine when it’s not calling a procedure. but when I use to call a procedure, I face with a strange problem with the result set.
when the procedure returns only one column $r1 will be filled out. but when I have more than one columns in result, fetch is done but no result’s given.
in both tests the number of result and bind_result columns are same.

I can’t understand the reason for such behavior. am I going wrong with the way I try to get the expected result from a procedure?

  • 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-18T00:44:08+00:00Added an answer on June 18, 2026 at 12:44 am

    It’s possible your procedure is returning more than one result set. You might need to use something like next_result (at least that’s what it is in mysqli).

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

Sidebar

Related Questions

I use the following code for retrieve the data from my Sql DB.retrieve StudName
I currently use the following code to retrieve and decompress string data from Amazon
I use the following type of code to retrieve data from some Excel Workbooks
I am trying to use the following code to retrieve data from a custom
I have tried to use the following code to retrieve the data from the
I use the following code to retrieve the data from MySql database. GContnStr is
I use the following code for retrieve the data from mysql Student data Base.It
Evening, i use the following code to retrieve data from the database in order
I use the following code to retrieve image from the phone or SDCard and
I'm using the following code in an attempt to retrieve data from two tables

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.