Skip to content

Commit

Permalink
Fix tablename
Browse files Browse the repository at this point in the history
  • Loading branch information
felipeelia committed Jan 20, 2025
1 parent 265b928 commit 689fedb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions includes/classes/Feature/VectorEmbeddings/Storage/DbTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ public function get( string $text ) {

$vectors = $wpdb->get_var(
$wpdb->prepare(
'SELECT vectors FROM %s WHERE hash = %s',
$table_name,
// phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
"SELECT vectors FROM {$table_name} WHERE hash = %s",
$this->hash_content( $text )
)
);
Expand All @@ -155,8 +155,8 @@ public function get_all_object_hashes( int $object_id, string $object_type ): ar

$rows = $wpdb->get_results(
$wpdb->prepare(
'SELECT hash, vectors FROM %s WHERE object_id = %d AND object_type = %s',
$table_name,
// phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
"SELECT hash, vectors FROM {$table_name} WHERE object_id = %d AND object_type = %s",
$object_id,
$object_type
)
Expand Down

0 comments on commit 689fedb

Please sign in to comment.