db7_forms structure
-
Hi,
Please can you clarify the structure of the db7_forms table. In my Contact Forms List in WordPress I can see 5 forms types listed.
I want to query the data in each of the contact form types. ie. I have a form type called ‘People’ and 20 of forms completed with data being submitted.
I used the query:
global $wpdb;
$table_name = $wpdb->prefix.’db7_forms’;
$total_query = “SELECT COUNT(*) FROM $table_name”;
$total = $wpdb->get_var( $total_query );
echo $total;And it returned ’55’ and I have 5 contact form types and yes there are 55 sets of data accross all 5 of them in total.
People 20 form submissions
Test 10 form submissions
Green 10 form submissions
Red 10 form submissions
Blue 5 form submissionsHowever I would like to query the data in one of the 5 types for example in the ‘people’ form submissions there is a field named ‘surname’. How can I either list the 20 surnames? or query each of them?
I used this:
$table_name = $wpdb->prefix.’db7_forms’;
$post = $wpdb->get_results(“SELECT * FROM $table_name WHERE Name = ‘People'”);
echo “"; print_r($post); echo "
“;
And just get the text ‘Array()’
As I see it the structure is db7_forms-people-surname-data. is this right?
Any help appreciated.
- The topic ‘db7_forms structure’ is closed to new replies.