Support » Plugins » MySQL affected rows

  • Is there a way to use this MySQL command for WordPress queries? Right now using $wpdb it returns as “improper syntax”.

Viewing 1 replies (of 1 total)
  • The return value of the query should give that number. The $wpdb class is in the wp-db.php file. Apparently some class attributes are created on the fly… try

    $wpdb->rows_affected (for insert/delete/update/replace)

    $wpdb->num_rows (number of rows returned for select)

    $wpdb->insert_id (id of last inserted/replaced record)

    $wpdb->last_error

    $wpdb->print_error()

    And you may find more gems in the code.

Viewing 1 replies (of 1 total)
  • The topic ‘MySQL affected rows’ is closed to new replies.