first; Sorry for my english, I’m from germany.
I have a problem, that I don’t really understand so far. I created a new table in the standard wordpress-database. I’m trying to check if an entry exists. If yes, do nothing, else, make a new entry. The code is the following:
$Result = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->wp_mod_likes WHERE comment_ID = '$cmt_ID', comment_parent = '$cmt_prnt'");
But for me, the variable $Result always is zero, even if there is an entry which matches. I tried a lot of things, but nothing worked…
Can somebody help me?
Very thank you all! 🙂
- The topic ‘$wpdb->get_var( ) returns every time 0?’ is closed to new replies.