Your Time:
Our Time:
← Back to discussions

Warning: mysqli_num_rows()

Need help with a different issue? Search the forums or open a new ticket.
Open a support ticket

This topic has 12 replies, 3 voices, and was last updated 10 years, 3 months ago by Fem.

Tagged: 

  • 2016-06-08 at 9:00 pm
    Support Expired
    #14796
    reflex84
    Participant
    • Topics: 1
    • Replies: 6
    • Total posts: 7
    • Post count: 6

    HI,

    When I log into the Advanced Testimonials Manager, I get Warning: mysqli_num_rows() errors. Please see image here: http://pasteboard.co/1x3OdQeO.png or attached.

    I’m running a WAMP server off Windows 2012.

    I also noticed an UPDATE MESSAGE:

    “Update Plugin to Version 4.1.1
    You are using an outdated version of Advanced Testimonial Manager Script.
    You can upgrade it to latest version by clicking on Update Script button. If you have any questions regarding the updates you can feel free to create a ticket in our dedicated support forum where our support staff will help you with the upgrades.”

    The thing is …. I did use version 4.1.1 in the install…so I cannot understand why it’s prompting me to update? And when I click Update… it “updates successfully” but the UPDATE MESSAGE above doesn’t go away.

    2016-06-09 at 12:41 pm
    #14819
    Anonymous
    Inactive
    • Topics: 0
    • Replies: 3227
    • Total posts: 3227
    • Post count: 0

    There are no testimonials in your database. So add some testimonials in the database and see. If the bug still arises then let us know so that we can make a fix for that asap.

    For your other question which is Update Plugin to Version 4.1.1,
    Open testimonials/admin/index.php on line around #61,
    replace
    <?php if( $version <= $new_version || $version == NULL ) { ?>

    with
    <?php if( $version < $new_version || $version == NULL ) { ?>

    2016-06-09 at 12:42 pm
    Support Expired
    #14820
    reflex84
    Participant
    • Topics: 1
    • Replies: 6
    • Total posts: 7
    • Post count: 6
    This reply has been marked as private.
    2016-06-09 at 12:44 pm
    #14821
    Anonymous
    Inactive
    • Topics: 0
    • Replies: 3227
    • Total posts: 3227
    • Post count: 0

    Sorry, that message isn’t for you. I have deleted that.

    2016-06-09 at 12:44 pm
    Support Expired
    #14822
    reflex84
    Participant
    • Topics: 1
    • Replies: 6
    • Total posts: 7
    • Post count: 6

    “There are no testimonials in your database. So add some testimonials in the database and see. If the bug still arises then let us know so that we can make a fix for that asap.”

    It shouldn’t be a case where “if there’s no testimonials then you will have error messages”…

    2016-06-09 at 12:48 pm
    Support Expired
    #14823
    reflex84
    Participant
    • Topics: 1
    • Replies: 6
    • Total posts: 7
    • Post count: 6

    Someone else had the same problem on codecanyon comment section. You guys apparently fixed it… so what did you do with his/hers script?

    http://codecanyon.net/item/advanced-testimonials-manager/113257/comments?utf8=%E2%9C%93&term=warning&from_buyers_and_authors_only=0
    clubd6

    2016-06-09 at 1:01 pm
    #14824
    Anonymous
    Inactive
    • Topics: 0
    • Replies: 3227
    • Total posts: 3227
    • Post count: 0

    I knew it’s a bug. We’ll fix this and we’ll release a new version with in a day soon.

    But if you want it to resolve asap, then replace these 2 files in admin folder and see but before replacing take a backup of these 2 files.

    2016-06-09 at 1:28 pm
    Support Expired
    #14826
    reflex84
    Participant
    • Topics: 1
    • Replies: 6
    • Total posts: 7
    • Post count: 6

    Thanks …

    The files replacements sorted out some warnings, however I am getting ONE warning for the following pages:

    ACCEPTED:

    Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in C:\……..\guest-reviews\admin\accepted.php on line 48

    PENDING:

    Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in C:\……..\guest-reviews\admin\pending.php on line 47

    DENIED:

    Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in C:\……..\guest-reviews\admin\denied.php on line 45

    2016-06-09 at 1:36 pm
    #14827
    Anonymous
    Inactive
    • Topics: 0
    • Replies: 3227
    • Total posts: 3227
    • Post count: 0

    ACCEPTED:

    Replace this on line no#46 in admin/accepted.php file

    //Accepted testimonials
    $acceptsql = mysqli_query($link, "SELECT * from review where status='1'");
    $accepttotal = mysqli_num_rows( $acceptsql );

    with

    //Accepted testimonials
    $accepttotal = '0';
    if ( $acceptsql = mysqli_query($link, "SELECT * from review where status='1'") ) {
    	$accepttotal = mysqli_num_rows( $acceptsql );
    }

    PENDING:

    Replace this on line no#45 in admin/pending.php file

    //pending testimonials
    $pendingsql = mysqli_query($link, "SELECT * from review where status='0'");
    $pendingtotal = mysqli_num_rows( $pendingsql );	

    with

    //pending testimonials
    $pendingtotal = '0';
    if ( $pendingsql = mysqli_query($link, "SELECT * from review where status='0'") ) {
    	$pendingtotal = mysqli_num_rows( $pendingsql );
    }

    DENIED:

    Replace this on line no#43 in admin/denied.php file

    //Denied testimonials
    $deniedsql = mysqli_query($link,"SELECT * from review where status='-1'");
    $deniedtotal = mysqli_num_rows( $deniedsql );

    with

    //Denied testimonials
    $deniedtotal = '0';
    if ( $deniedsql = mysqli_query($link,"SELECT * from review where status='-1'") ) {
    	$deniedtotal = mysqli_num_rows( $deniedsql );
    }
    2016-06-09 at 1:59 pm
    Support Expired
    #14828
    reflex84
    Participant
    • Topics: 1
    • Replies: 6
    • Total posts: 7
    • Post count: 6

    Hi,

    Thanks … Your replacements have gotten rid of the error messages however:

    1) Have we just gotten rid of the error messages but the problems remain that we can’t see or 2) Have we sorted out the issues altogether?

    Why did this happen to me and not others?

    2016-06-09 at 3:27 pm
    #14829
    Anonymous
    Inactive
    • Topics: 0
    • Replies: 3227
    • Total posts: 3227
    • Post count: 0

    Did you deleted the testimonials in database which comes by default with the script. By default we have added 1 testimonial with installation, if you remove that one then you’ll see that error. We have not tested with an empty database so far but we’ll consider updating it soon.

    This has been resolved it for you but not for others. We’ll update the script very soon.

    If you have anymore questions please feel free to contact us. We’ll be there to assist you.

    2016-06-09 at 4:25 pm
    Support Expired
    #14831
    reflex84
    Participant
    • Topics: 1
    • Replies: 6
    • Total posts: 7
    • Post count: 6
    This reply has been marked as private.
    2016-06-10 at 12:15 pm
    #14858
    Fem
    Keymaster
    • Topics: 2
    • Replies: 5215
    • Total posts: 5217
    • Post count: 6003

    Thanks for your input but as you know software always comes with a bug. So, we will consider fixing it and releasing in the next update soon that no one should see while activating.

You must be logged in to reply to this topic.