Skip to content

refactor wpdb statements#165

Open
jamesros161 wants to merge 8 commits into
masterfrom
issue-123
Open

refactor wpdb statements#165
jamesros161 wants to merge 8 commits into
masterfrom
issue-123

Conversation

@jamesros161

Copy link
Copy Markdown
Collaborator

Resolves #123

Comment thread includes/class-boldgrid-inspirations-purchase-for-publish.php Outdated
* @param array $values,
* @return array $placeholders
*/
public function get_prepare_placeholders( $values ) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method is get prepare placeholders.

The method itself is not doing any sql preparing, nor is it doing anything with placeholders. It's simply looping through an array and merging things.

Is it really needed? Maybe we rename it to something that makes more sense?

Comment thread includes/class-boldgrid-inspirations-purchase-for-publish.php Outdated
);

$query = $wpdb->prepare(
"SELECT `ID` FROM $wpdb->posts WHERE `post_content` LIKE %s AND `post_status` IN ( " .

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm trying to peer review and figure out what has changed... The PR can be much cleaner and easier to understand by not reformatting, unless it needs to be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] PHP 8 Warning: mysqli_query(): The regular expression contains an unclosed bracket expression.

2 participants