[wp-trac] [WordPress Trac] #41929: Bug wpdb prepare 4.8.2
WordPress Trac
noreply at wordpress.org
Wed Sep 20 14:32:31 UTC 2017
#41929: Bug wpdb prepare 4.8.2
---------------------------+-----------------------------
Reporter: victorfreitas | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Query | Version: 4.8.2
Severity: normal | Keywords:
Focuses: |
---------------------------+-----------------------------
After updating to 4.8.2, my SQL query in prepare method not working.
Code example:
{{{#!php
<?php
$results = $wpdb->get_results(
$wpdb->prepare(
"SELECT
`ID`
FROM
`{$wpdb->posts}`
WHERE
`ID` = %1\$d
AND
`post_status` = '%2\$s'
",
100,
'publish'
)
);
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41929>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list