Database Count Query Not Returning Results
-
Evening all,
I am having an issue with this particular query. It works for certain tables (like the users table), but not the one listed in the code. When I query the users table, it retrieves a number (the number of rows, as it’s supposed to). However, when I query the fm_data_1 table, it does not return anything.
I have tried everything I can think of, and cannot seem to get it to work. Any suggestions would be greatly appreciated!
function displayText($rowCount){ global $wpdb; $row = $wpdb->get_var( 'SELECT COUNT(*) FROM $wpdb->fm_data_1' ); echo "The count of rows is {$row}"; } add_filter('the_content','displayText');
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Database Count Query Not Returning Results’ is closed to new replies.