On volume pass single quote in parameter. Now your query is
SELECT * FROM cp WHERE year="1911" AND quarter="4" AND volume="2a" AND page <= '1475' ORDER BY page DESC LIMIT 1 Try this code
Related Posts:
- When should you use WP_Query vs query_posts() vs get_posts()?
- WP_Query by just the id?
- How to query for most viewed posts and show top 5
- Delete all posts from WordPress except latest X posts
- WP_Query result in form of Rest API results
- get_posts with multiple categories
- WP Query to get all posts (including in draft/pending review)
- How to order posts tag by tag?
- Want to redirect if search query match exact title of any post
- Overriding The Loop with filter or hook
- Slow SQL_CALC_FOUND_ROWS Query
- Most commented post should be the first post in the blog
- Perform query with meta_value date
- Custom archive page based on array of categories and tags
- How can I connect to another WP database and use WP_Query?
- Compare two meta-fields in a wp_query (where meta-field-A is larger than meta-field-B)
- Different Results with query(‘s=computer’) vs get_posts(‘s=computer’)?
- Why does “Blog pages show at most” interfere with my custom wp_query?
- Recommended way to drop a pending query (in pre_get_posts)?
- How to search for posts IN OR title OR content OR author?
- WP_Query class not found
- Search – Ajax – Alter Query Parameters with Pagination
- Access to Instance Variables from WP_Query
- WP Query with multiple categories – passing an array works?
- Order by menu structure
- Custom query, works, but I get a “Notice: Undefined offset: 0…”
- SQL User Query by Multiple Roles using PHP
- how to speed up a complex wp_query?
- How to capture a variable query string, then append it to all URLs in a WordPress site
- Exhausted memory limit with very simple WP_Query
- WP_Query doesn’t get sticky post at the top, when used in a page template
- What’s faster? One big query, or several smaller ones?
- Multiple Loops Inside a Function
- Sort users by “birthday” using WP_User_Query
- Overwriting posts_per_page in new WP_Query
- How to use WP_Query without breaking the main Query
- How to use MySQL’s MATCH AGAINST in WP_Query?
- Ajax Pagination on Ajax filter
- Wp_query returning only one post while query through ajax
- only delete post within query / for each statement (front end)
- Database Queries Optimization with new WP_Query
- How to optimize multiple WP_Query() calls on one page?
- How to make “Blog pages show at most” setting not affect custom queries
- category query for pages not working
- Bypass “supress_filters” in WP Query
- date_query on draft posts only
- Order ascending is ignored in meta query?
- Custom Pagination in Shortcode with WP_Query
- How to get list of posts from permalinks?
- WP Query – Post Thumbnail
- How to change main query to only query posts from a single category? [duplicate]
- Pagination for blog posts reloading same page [closed]
- wp_query not working with post_type
- Individual months in WP Query
- how to use pre_gets_posts to exclude one queried ID from homepage loop
- date_query in pre_get_posts out of memory
- Combine 2 WP_queries into one (OR relation)
- WP_QUERY wrong ammount of posts
- How to add sort order to incremented and paginated category loop
- One WP_Query that always shows 1 post from category X and 1 post from “not in category X”?
- Link Author URL’s based on a custom field
- How to set parameters for search loop?
- Get posts with no tags?
- get_posts query matches too many results
- Sort by custom field that is an array?
- Which is from this queries is more faster
- Start Query from 2nd Post without offset
- What’s missing in this wp_query and meta_query
- Related posts by current posts child category
- Trying to change category of wp_query
- Any quicker alternative for WP_Query “NOT IN”
- Tax Query on product_cat using NOT IN as operator does not exclude that category
- duplicated posts when using pagination
- How to use the Term Object from a custom select field in a query
- Random users always showing same 8 users
- meta_query order by date present -> future then show null
- Wp-query and column blocks
- In a WordPress multisite configuration, how do I instruct WP_Query() to return posts from a sub-site?
- How to query for exact string in custom field?
- Multi line of $wpdb->query just run 1 time and end the loop right after
- Sort posts on custom field AND after that sort on date?
- Get last child of given page by ID
- How to query users by post count no less than 10
- display the children of the post using the current page as the main parent
- Display 3 levels of categories on page
- Paginated Author.php not using Author.php template
- A very strange problem with search query
- In Product Category archives how to show Posts having same/similar prod_cat slug structure?
- Custom Theme Building & Permalinks
- wp_query – show pages that have parent defined
- previous_posts_link not working in WordPress pagination
- Eliminate typical pages on search page, turn it into ajax search with “infinite” sized single page
- query inside main query order issue
- Stylesheet won’t load even when linked
- meta_query in wp_query not working as expected
- Undefined variable [closed]
- Why does $post_id = $wp_query->get_queried_object_id(); return 0?
- Pre_get_post on CPT archive page
- How to get rid of extra Untitled Article in html5 document outline when using new WP_Query?
- WP_Query (or WC_Product_Query) out of memory