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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:17:11+00:00 2026-05-27T23:17:11+00:00

I am working with MySQL in conjunction with ExpressionEngine 2.2.1. This version of ExpressionEngine

  • 0

I am working with MySQL in conjunction with ExpressionEngine 2.2.1. This version of ExpressionEngine automatically comes with a Query Module, which I am using to filter and display entry results from a module called Freeform. I am using Freeform version 3.1.1. All of these elements are working well together and displaying the desired results on my local setup. However when I push my code to production, I am receiving this error:

Fatal error: Call to a member function num_rows() on a non-object in /var/www/vhosts/xxxxxxxxx.com/systemxxx/expressionengine/modules/query/mod.query.php on line 183

Here is this section of the code beginning on line 183 of mod.query.php (I did not code this php, nor have I ever coded php, this was already included with the site that I am working on.):

183          if ($query->num_rows() == 0)
184          {
185          return $this->return_data = $this->EE->TMPL->no_results();
186          }

Here is how I am using the Query Module in my HTML Template:

{exp:query sql="SELECT first_name, last_name, email, city FROM exp_freeform_entries WHERE city = 'New York'"}
    <tr>
        <td>{first_name}</td>
        <td>{last_name}</td>
        <td>{email}</td>
        <td>{city}</td>
    </tr>
{/exp:query}

Does anyone know why this error is occurring? Why would it be occurring on production but not locally?

Any help would be 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-05-27T23:17:12+00:00Added an answer on May 27, 2026 at 11:17 pm

    Check to make sure the database in Production has the same structure as your Local environment.

    Perform the following steps from phpMyAdmin or your favorite MySQL GUI client:

    1. Select your ExpressionEngine database
    2. Execute the following SQL Statements:
    3. DESCRIBE exp_freeform_fields;
    4. SELECT name FROM exp_freeform_fields;

    Compare the results from your Local MySQL Database to your Production MySQL Database.

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

Sidebar

Related Questions

I'm working with a MySQL query that writes into an outfile. I run this
I have a working mysql query which returns all of the people NOT registered
I've developed an application at working using MySQL 5, that uses Views to access
Can a PHP script (which can be working with a MySQL DB) send and/or
I had the below query working in mysql 4.1, but does not in 5.0:
Any ideas why this isn't working in MySQL? SELECT blogentry.*, person.personName, (SELECT * FROM
I am trying to move project which was using MySQL database to the one
I wrote a class which working with MYSQL on Tomcat 7.0 server. I connected
i am working in mysql. I need to find the database within which the
I am working on MySQL 5.1.3 and using PHPMyAdmin 3.1.3.1 to access it. With

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.