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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:30:42+00:00 2026-05-25T19:30:42+00:00

After I perform a database query, and some rows are echoed, it seems that

  • 0

After I perform a database query, and some rows are echoed, it seems that I can’t get the number of rows which are shown, after the query. Tried to use mysql_num_rows() but my $result is like this:

$result = $conn->query($sql) or die();

so I think that the problem is that I’ve used the built-in MySQLi() class, and for some reason
mysql_num_rows() is not working in accordance with this $result. How can I get it to work with the current $result I’m using, or is there any other way to return the number of rows using the MySQLi() class to create the $result??

  • 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-25T19:30:42+00:00Added an answer on May 25, 2026 at 7:30 pm

    mysql and mysqli are NOT interchangeable. They’re two completely different modules, maintain their own separate connections, and are results/handles from one are NOT useable in the other. They may both use the same underlying mysql libraries and talk to the same database, but they’re utterly independent of each other.

    If you’re using MySQLi, then stick with MySQLi functions, which for your problem would be to use http://php.net/manual/en/mysqli-stmt.num-rows.php

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

Sidebar

Related Questions

After executing a query statement on a MySQL database connection, I perform: rows =
I would like to post-process my app.config file and perform some token replacements after
After running a insert or update query against a SQLServer 2005 database, under what
I'm using VB.NET. I am performing a select query that returns approximately 2500 rows,
I need to sort some data that is not coming from a database, but
I need to perform an action after a session times out. However I have
After creating a new form, I usually perform this ritual: Change the name into
After creating a child process and exiting it immediately (_exit()), I want to perform
I wish to perform an experiment many different times. After every trial, I am
After reading the Head First Design Patterns book and using a number of other

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.