Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 112600

The wpdb class, accessed via the $wpdb global variable, is used to interact with the WordPress database

0 votes
1 answer
19k views

$wpdb update query in plugin only updating one column

$table = $wpdb->prefix . … 'woocommerce_downloadable_product_permissions'; $expiry_date = date("Y-m-d", strtotime("+ 30 days")); $expiry_time = $expiry_date . ' 00:00:10'; $wpdb->query("UPDATE `$table` SET `downloads_remaining …
hal's user avatar
  • 35
2 votes

$wpdb update query in plugin only updating one column

The $wpdb->update syntax cant deal with calculating based on the existing value. But for the other two fields it works. So like this: $table = $wpdb->prefix . … 'woocommerce_downloadable_product_permissions'; $expiry_date = date("Y-m-d", strtotime("+ 30 days")); $expiry_time = $expiry_date . ' 00:00:00'; $wpdb->query("UPDATE $table SET download_count = …
hal's user avatar
  • 35