Merge pull request #1908 from KingYes/master

Fixing SQL syntax in woo.._product_ordering().
This commit is contained in:
Mike Jolley 2012-12-04 12:23:59 -08:00
commit c042a682bc
1 changed files with 6 additions and 6 deletions

View File

@ -1819,13 +1819,13 @@ function woocommerce_product_ordering() {
$nextid = isset( $_POST['nextid'] ) ? $_POST['nextid'] : false;
$new_pos = array(); // store new positions for ajax
$siblings = $wpdb->get_results( $wpdb->prepare("
SELECT ID, menu_order FROM %s AS posts
WHERE posts.post_type = 'product'
AND posts.post_status IN ( 'publish', 'pending', 'draft', 'future', 'private' )
AND posts.ID NOT IN (%s)
$siblings = $wpdb->get_results( $wpdb->prepare('
SELECT ID, menu_order FROM %1$s AS posts
WHERE posts.post_type = \'product\'
AND posts.post_status IN ( \'publish\', \'pending\', \'draft\', \'future\', \'private\' )
AND posts.ID NOT IN (%2$d)
ORDER BY posts.menu_order ASC, posts.ID DESC
"), $wpdb->posts, $post->ID );
', $wpdb->posts, $post->ID) );
$menu_order = 0;