Skip to content

Commit

Permalink
Merge pull request #144 from BeAPI/fix/sql-queries
Browse files Browse the repository at this point in the history
Add the missing AND keyword in sql queries
  • Loading branch information
Dacobah authored Dec 21, 2022
2 parents 1dd98eb + f2f43c5 commit ac1fe87
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
19 changes: 11 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,32 +44,35 @@ If you really like what we do or want to thank us for our quick work, feel free

## Changelog

### 3.9.8
* Fixed: Replace comma with the AND keyword in SQL queries

### 3.9.7

* Added : Add the cast for the arguments of the method
* Added: Add the cast for the arguments of the method

### 3.9.6

* Fixed : fix a bug by ensure "post_name" is set with wp_post_update() instead wp_publish_post()
* Added : object cache on relations
* Fixed: fix a bug by ensure "post_name" is set with wp_post_update() instead wp_publish_post()
* Added: object cache on relations

### 3.9.5

* Fixed : #136 When post does not exists on filter bea_csf.server.xxxx.merge
* Fixed: #136 When post does not exists on filter bea_csf.server.xxxx.merge
* Updating composer.json allowed plugin

### 3.9.4

* Fixed : Change the return type of `attachment_fields_to_edit` to array to match the filter type attended
* Added : Add the minimum WordPress version to plugin header
* Fixed: Change the return type of `attachment_fields_to_edit` to array to match the filter type attended
* Added: Add the minimum WordPress version to plugin header

### 3.9.3

* Fixed : Correction of the syntax for the creation of the relations table. (Missing commas)
* Fixed: Correction of the syntax for the creation of the relations table. (Missing commas)

### 3.9.2

* Feature : Added synchronisation of Gutenberg ACF blocks
* Feature: Added synchronisation of Gutenberg ACF blocks
* Fixed: Remove double all on admin widget

### 3.9.1
Expand Down
4 changes: 2 additions & 2 deletions bea-content-sync-fusion.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Plugin Name: BEA - Content Sync Fusion
Plugin URI: https://beapi.fr
Description: Manage content synchronization across a WordPress multisite.
Version: 3.9.7
Version: 3.9.8
Author: Be API
Author URI: http://beapi.fr
Network: true
Expand All @@ -14,7 +14,7 @@

// Plugin constants

define( 'BEA_CSF_VERSION', '3.9.7' );
define( 'BEA_CSF_VERSION', '3.9.8' );
define( 'BEA_CSF_DB_VERSION', '1649671234' );
define( 'BEA_CSF_OPTION', 'bea-content-sync-fusion' );
define( 'BEA_CSF_CRON_QTY', 500 );
Expand Down
4 changes: 2 additions & 2 deletions classes/models/relations.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ public static function delete_by_receiver( $type, $receiver_blog_id, $receiver_i
// Clean cache before delete
$relations = $wpdb->get_results(
$wpdb->prepare(
"SELECT * FROM $wpdb->bea_csf_relations WHERE type = %s, receiver_blog_id = %d, receiver_id = %d",
"SELECT * FROM $wpdb->bea_csf_relations WHERE type = %s AND receiver_blog_id = %d AND receiver_id = %d",
$type,
$receiver_blog_id,
$receiver_id
Expand Down Expand Up @@ -258,7 +258,7 @@ public static function delete_by_emitter_and_receiver( $type, $emitter_blog_id,
// Clean cache before delete
$relations = $wpdb->get_results(
$wpdb->prepare(
"SELECT * FROM $wpdb->bea_csf_relations WHERE type = %s, emitter_blog_id = %d, emitter_id = %d, receiver_blog_id = %d, receiver_id = %d",
"SELECT * FROM $wpdb->bea_csf_relations WHERE type = %s AND emitter_blog_id = %d AND emitter_id = %d AND receiver_blog_id = %d AND receiver_id = %d",
$type,
$emitter_blog_id,
$emitter_id,
Expand Down

0 comments on commit ac1fe87

Please sign in to comment.