Quantcast
Channel: Topic Tag: MySQL | WordPress.org
Viewing all articles
Browse latest Browse all 5534

Biswadip on "MySQL query not working with wp_posts table"

$
0
0

I am trying to write a MYSQL query to pull some bbpress forums data out of my wp_posts table. As long as there is one condition like:

$query="SELECT * FROM wp_posts WHERE post_type = 'forum';

it works fine but when there is more than one condition like:

$query="SELECT * FROM wp_posts WHERE post_type = 'forum' AND post_title = 'Business Intelligence'";

it returns nothing! When I paste the same query in the PHPmyadmin editor on the same table it returns the right result.

Thanks for your help

Bis


Viewing all articles
Browse latest Browse all 5534

Trending Articles