Skip to content

Commit 1424bb0

Browse files
committed
Correct SQL UPDATE format
1 parent 6be5040 commit 1424bb0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

php/snippet-ops.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ function activate_snippets( array $ids, $multisite = null ) {
269269

270270
/* Build a SQL query containing all the valid snippet IDs and activate the valid snippets */
271271
$ids_format = implode( ',', array_fill( 0, count( $valid_ids ), '%d' ) );
272-
$sql = sprintf( 'UPDATE %s SET active = 1 AND modified = %%s WHERE id IN (%s);', $table, $ids_format );
272+
$sql = sprintf( 'UPDATE %s SET active = 1, modified = %%s WHERE id IN (%s);', $table, $ids_format );
273273

274274
array_unshift( $valid_ids, Code_Snippet::current_date() );
275275
$wpdb->query( $wpdb->prepare( $sql, $valid_ids ) );

0 commit comments

Comments
 (0)