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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T19:53:29+00:00 2026-05-29T19:53:29+00:00

I get a Warning: mysql_affected_rows() expects parameter to be resource, boolean give in c:\program

  • 0

I get a Warning: mysql_affected_rows() expects parameter to be resource, boolean give in c:\program files\EasyPHP……line 71.

when i check the database the row is updated, but i still get this error message

line 71 is if ($duplicates < 0);

 $query = mysql_query("UPDATE courses 
  SET   
  course_code = '".$course_code."', 
  course_title = '".$course_title."' ,  
  course_unit = '".$course_unit."'   
  WHERE
  course_code = '".$course_code."'") 
  or die(mysql_error()); 

 $duplicates = mysql_affected_rows($query);
            if ($duplicates > 0)  


 echo"<div id=\"contentRight\">";
 echo"<idv id=\"msg\">" ;                             echo "You have a updated one Course " ;

  echo"</div>" ;
  echo"</div>" ;
   exit();
  • 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-29T19:53:30+00:00Added an answer on May 29, 2026 at 7:53 pm

    Unlike many other mySQL functions, mysql_affected_rows() doesn’t take a query resource as the first parameter: It returns the number of affected rows in the last operation, no matter when that happened.

    int mysql_affected_rows ([ resource $link_identifier ] )
    

    What you can pass to it optionally is the database connection resource. But that’s necessary only when you deal with more than one of them.

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

Sidebar

Related Questions

I get following Error: Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given
I get: "Resource id #8 Warning: mysql_fetch_array() expects parameter 1 to be resource, string
Possible Duplicate: “Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given” error while
Possible Duplicate: mysql_fetch_array() expects parameter 1 to be resource, boolean given in select I'm
I get this error whenever I run this: Warning: mysql_num_rows() expects parameter 1 to
Possible Duplicate: mysql_fetch_array() expects parameter 1 to be resource, boolean given in select This
I get the warning childNodes is null or not an object' with different line
EDIT I am now getting an error: Warning: mysql_num_rows() expects parameter 1 to be
When I use mysql_affected_rows($result); ...in php then I get below warning how to remove
When i try to run this code i get the error: Warning: mysql_fetch_array() expects

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.