Forums
Forums / Fixing WordPress / meta value count
(@lobos55)
16 years, 7 months ago
Hi, I have the following query:
$journal = get_post_meta($post_id, 'Journal', $single = true); $journal_count = $wpdb->get_var("SELECT COUNT (*) FROM $wpdb->postmeta WHERE meta_key = 'Journal' AND meta_value = '$journal' " );
this returns NULL.
I don’t understand why.
Anybody help?
(@t31os_)
Change this..
$single = true
to..
true
Does that help?
The topic ‘meta value count’ is closed to new replies.