primevitality on "[Plugin: Contact Form DB] Counter + Existing Number"

ساخت وبلاگ

primevitality
Member
Posted 2 days ago #

We are wanting a counter and the WP plugin Contact Form DB with Contact Form 7 is working great. However, my client wants to add to the number from their older dB to what is being submitted now. So, 30,203 are in the old dB and 104 are in the new one. How would I write this in the Contact Form short code plugin so 30,203 is added to the Contact Form 7 dB count?

https://wordpress.org/plugins/contact-form-7-to-database-extension/

Does "old DB" mean a different database / WordPress site? Or do you mean in the same DB but under a different form name?

In the first case you could try exporting the plugin table via PhpMyAdmin in the old DB then import into the new. In the second case, you could run a SQL statement to reame the field's form name.

The (nor free) CFDB Editor does export/import and renaming but I think your site will likely runout of memory doing 30k entries, so the PhpMyAdmin export/import might be best.

primevitality
Member
Posted 1 day ago #

Yes, "old dB" means a whole different site/database. My hope was I just write a small line that takes the existing number of 30k and just simply adds it to the new database/site. I know it's wrong, but something to the effect of [cfdb-count add="30,023" form="the-pledge"]. Based on your answer it sounds like this isn't possible. I don't want to blow up the site by adding an additional 30k more people to the dB so I was hoping for a basic math formula to add into the count short code.

If you just want to add on 30,023 to the total count, try:

[cfdb-value form="YOUR FORM" show="submit_time" trans="CountField(submit_time)&&submit_time=sum(submit_time,30023)"]

primevitality
Member
Posted 12 minutes ago #

That worked perfectly. Thank you VERY much!

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 90 تاريخ : يکشنبه 12 ارديبهشت 1395 ساعت: 10:26