If this is your first visit, check our documentation. To post, register or login.
Forums / Zen Cart Code Suggestions / Add queryFactory class function to return the number of rows affected

Add queryFactory class function to return the number of rows affected

Started by lat9 on 21 Feb 2016, 5:23 PM · Views: 57

Results 1 to 2 of 2
21 Feb 2016, 5:23 PM
#1
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,140
Plugin Contributions:
56

Add queryFactory class function to return the number of rows affected

As identified in this thread, the queryFactory class could benefit from an additional function that returns the number of rows affected by a previous INSERT, UPDATE, DELETE or REPLACE action. I suggest the following addition to /includes/classes/db/mysql/query_factory.php (Zen Cart v1.5.2 and later):

    function affectedRows ()
    {
        return mysqli_affected_rows ($this->link);
    }
22 Feb 2016, 3:16 AM
#2
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,974
Plugin Contributions:
8

Re: Add queryFactory class function to return the number of rows affected

i second the suggestion!

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.