Database Query Help
-
HI, I’m new to the database query game.
I have this query that selects posts for use in a database filter calculation:
SELECT post.post_title,post.post_excerpt,post.post_date,post.guid,user.display_name FROM {wpdb.posts} post INNER JOIN {wpdb.users} as user ON (post.post_author=user.ID) WHERE post.post_title LIKE “%<%fieldname2%>%” OR post.post_excerpt LIKE “%<%fieldname2%>%” OR post.post_content LIKE “%<%fieldname2%>%”
I just want to call my custom posts. My custom post name is price_book. How would I do this.
I would greatly appreciate any help.
Thanks!
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.