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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T19:42:45+00:00 2026-06-13T19:42:45+00:00

PHP Warning: mysql_num_rows() expects parameter 1 to be resource at line x. I checked

  • 0

PHP Warning: mysql_num_rows() expects parameter 1 to be resource at line x.
I checked for all single quotes missing and sql link .

$v = html_entity_decode($v);
            $query_1 = sprintf("select part_of_speech_id from word_parts_of_speech where word = '%s'", mysql_real_escape_string($v));
            $res = Commons::query($query_1) ;
            if(mysql_num_rows($res) != 0){
                    while  ($row  =  mysql_fetch_assoc($res))  {

                            if($row['part_of_speech_id']!=15){//see table down for reference

                                    $query_url = "insert into freetext_keywords(RANDOM_ID,URL,TAG_NAME,KEYWORD) values('$random_id','$url','$tagName','$v') on duplicate key update WEIGHT = WEIGHT + 1";
                                    $result = Commons::query($query_url);
                            }
                    }
            }else{
                    $query_url = "insert into freetext_keywords(RANDOM_ID,URL,TAG_NAME,KEYWORD) values('$random_id','$url','$tagName','$v') on duplicate key update WEIGHT = WEIGHT + 1";
                    $result = Commons::query($query_url);
            }


    }
  • 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-13T19:42:46+00:00Added an answer on June 13, 2026 at 7:42 pm

    Just echo the MySql query in php and run against the database in phpmyadmin (I hope you are using phpmyadmin to access your database)

    And see if the query execute well and return result. If it shows any errors, please correct your query accordingly.

    <?php
    
    echo $query_1 = sprintf("select part_of_speech_id from word_parts_of_speech where word = '%s'", mysql_real_escape_string($v));
    
    ?>
    

    Copy the query from the browser and run directly against database.

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

Sidebar

Related Questions

EDIT I am now getting an error: Warning: mysql_num_rows() expects parameter 1 to be
Possible Duplicate: PHP Error: mysql_fetch_array() expects parameter 1 to be resource, boolean given I
Possible Duplicate: mysql_fetch_array() expects parameter 1 to be resource, boolean given in select I
Possible Duplicate: mysql_fetch_array() expects parameter 1 to be resource, boolean given in select Here's
Possible Duplicate: mysql_fetch_array() expects parameter 1 to be resource, boolean given in select I
I am getting the error: Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean
I am encountering an error. My log is as follows: PHP Warning: mysql_num_rows(): supplied
I am getting this error when my login.php file loads.. 'Warning: mysql_num_rows(): supplied argument
Recently the PHP manual started showing the following warning on every mysql function page:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php53/modules/mailparse.so' - /usr/lib64/php53/modules/mailparse.so: cannot open

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.