Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor wpdb statements #165

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

refactor wpdb statements #165

wants to merge 8 commits into from

Conversation

jamesros161
Copy link
Collaborator

Resolves #123

* @param array $values,
* @return array $placeholders
*/
public function get_prepare_placeholders( $values ) {
Copy link
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?

);

$query = $wpdb->prepare(
"SELECT `ID` FROM $wpdb->posts WHERE `post_content` LIKE %s AND `post_status` IN ( " .
Copy link
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