Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#41929 closed defect (bug) (duplicate)

Bug wpdb prepare 4.8.2

Reported by: victorfreitas's profile victorfreitas Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.8.2
Component: Query Keywords:
Focuses: Cc:


After updating to 4.8.2, my SQL query in prepare method not working.

Code example:

        $results = $wpdb->get_results(
                                `ID` = %1\$d
                                `post_status` = '%2\$s'

Change History (2)

#1 follow-up: @ocean90
6 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Hello @victorfreitas, numbered placeholders are not supported by wpdb::prepare(), see #41926 and #41925.

#2 in reply to: ↑ 1 @victorfreitas
6 years ago

Replying to ocean90:

Thank you @ocean90 for the feedback.

Note: See TracTickets for help on using tickets.