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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:36:20+00:00 2026-05-26T18:36:20+00:00

I want to know how to view the SQL query held by a MySQLi_STMT

  • 0

I want to know how to view the SQL query held by a MySQLi_STMT object.

I’m using an object of type MySQLi_STMT and I want to inspect the SQL statement associated with the object. I set the SQL query using the

   mysqli_stmt::prepare ( string $query ) 

function. I then call the

   mysqli_stmt::bind_param( string $types , array $params )

function to bind parameters in the query. I want to ensure that the binding was done correctly by inspecting the mysqli_stmt object. However, upon viewing the class’s instance fields, none of them hold the newly-bound query. $errno is 0 and $sqlstate is ‘00000’ so it doesn’t seem like there’s an error, but

   mysqli_stmt::execute()

keeps returning null, as opposed to returning false as the documentation says it should, leading me to believe that there is a syntax error in the query. Again, $errno is 0 and $sqlstate is ‘00000’ after the execute() call so it doesn’t appear that an error occurred, but I’d still like to know how to access the query being stored in the mysqli_stmt object.

  • 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-26T18:36:21+00:00Added an answer on May 26, 2026 at 6:36 pm

    Well, according to http://www.phpfreaks.com/forums/index.php?topic=263790.0, you really can’t get to the underlying query. In my opinion, this is a serious omission in the class definition. Pity…

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

Sidebar

Related Questions

want to know why String behaves like value type while using ==. String s1
I'm using SQL Server 2005, and I want to query for the vendors generating
I want to make a conversation view with ListBox, but I don't know how
Using Django 1.1, how could I create a crosstab (pivot table) SQL query using
I created a view. The view's Query works fine. Now I want to write
I'm using SQL Server 2008 with Report Builder 2.0 to try and query data
I am using View as a Data Source to my DataGridView and I want
I need to get View SQL Query to display it in some text box
i want know if is possible, to get a specific element value of a
I'm making a chat responder for a game and i want know if there

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.