TOPIC:

How to delete all records from a specific form 1 week 3 days ago #261526

  • Topic Author
  • easytherm
  • Offline
  • Gold Breezer
  • Gold Breezer
  • Posts: 411
  • Thanks: 2
Hi Tihana, my day is already saved thank to your kind help !!

Now I have -hopefully- a last question

I could delete all records from the unwanted forms (about 10'000) in a couple of seconds.

Now I have only the the records of the remaining form.

On this form, every year, about 2000 records are generated

Can I add a new condition in the before form piece, in order to delete all record which have ID < 4000 (for example). Can you show me how to do that ?

Jacques

Please Log in or Create an account to join the conversation.

How to delete all records from a specific form 1 week 3 days ago #261527

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 6455
  • Karma: 3
  • Thanks: 456
Hi,

please try it like this:
$this->execPieceByName('ff_InitLib');
$db = JFactory::getDBO();
$db->setQuery('Select id From #__facileforms_records Where name="FormName" And id < 4000'); //replace FormName with name of your form (not title)
$ids = $db->loadColumn();

$id = implode("', '", $ids);
$db->setQuery("Delete From #__facileforms_records Where id In ('$id')");
$db->execute();
$db->setQuery("Delete From #__facileforms_subrecords Where record In ('$id')");
$db->execute();
Let me know the result

Regards,
Tihana

Please Log in or Create an account to join the conversation.

How to delete all records from a specific form 1 week 3 days ago #261528

  • Topic Author
  • easytherm
  • Offline
  • Gold Breezer
  • Gold Breezer
  • Posts: 411
  • Thanks: 2
Thank you so much !

I sent you a little tipp

kind regards

Jacques

Please Log in or Create an account to join the conversation.

How to delete all records from a specific form 1 week 3 days ago #261529

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 6455
  • Karma: 3
  • Thanks: 456
Hi,

thanks :)

If you need anything else, feel free to ask

Regards,
Tihana

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
  • 2
Time to create page: 0.039 seconds

BreezingForms Pro 1.4.7 for WordPress Released!

Available in the membership section.

September Discount!

Massive discounts on all subscriptions!

Get Your Subscription Here

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Special Offer

Summer Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!