I have the following code which was working but now for some reason does not.
if(isset($_REQUEST['website'])){$dbfields['website'] = $_REQUEST['website'];};
if(isset($_REQUEST['email'])){$dbfields['email'] = $_REQUEST['email'];};
$where = array( 'ID' => $_REQUEST['ID'] );
$result = $wpdb->update($this->the_table, $dbfields, $where);
return $result;
The result object should return 2, but now returns 0 suggesting that the values are the same.
Whatever I set the values to, the db is not updated and a result of 0 is returned.
Is there any way of finding what query is being generated by the wpdb object. Unfortunately, I have no real ability to properly debug php on the server.
From http://codex.wordpress.org/Class_Reference/wpdb#UPDATE_rows
The 0 (or false) most probably indicates an error has occurred. I suggest you enable debug mode though be prepared to sift through all the errors from the WordPress core and any other plugins you have installed.
Also, unless
IDis not a primary key, I’d only expect your update to return at most one result.