TOPIC:

Question urgently: Where is the file path of this submit button? 1 year 1 month ago #236910

  • Topic Author
  • magicican
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 11
  • Thanks: 0
Dear Administrator, Hello!

Thank you very much for your reply. It helped me a lot. Now my BreezingForms form can be inserted into my custom data table. But I still have one problem. I want to consult the administrator. Trouble.

1. In Joomla, how can I get a row of data in the database and assign it to a PHP variable, so that I can compare the data I just submitted with the data I submitted before and write code. If it's convenient, please give an example to the administrator. Thank you very much.

I don't know and I haven't made it clear. In fact, I have a Select * From SQL statement. I hope to get the result of this statement and assign it to a new variable. Then I use this variable to make IF judgment. That's roughly what I mean.

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

Question urgently: Where is the file path of this submit button? 1 year 1 month ago #236923

  • mihaela
  • Offline
  • Developer
  • Developer
  • Posts: 3128
  • Karma: 105
  • Thanks: 415
Hello again,

I'm glad that it helped. :)

I think that I understand what you mean regarding the new request.

The query depends on which data exactly you wish to fetch from the database, but the point is to write a SELECT query using setQuery.

Here is an example of how would it look like in Submit pieces:
$this -> execPieceByName('ff_InitLib');
$db = JFactory::getDBO();//Get Database Object
$db->setQuery("SELECT value from #__facileforms_subrecords WHERE element = 379 ORDER BY id DESC"); 
$tmp= $db->loadResult();
This is an example of fetching a value from element 379 which was submitted in the last submission.
The value is that way saved to variable $tmp and you can use it in further code to do the comparison or other actions.

Let me know whether this works as you wanted.

Regards,

Mihaela
The following user(s) said Thank You: magicican

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

Question urgently: Where is the file path of this submit button? 1 year 1 month ago #236936

  • Topic Author
  • magicican
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 11
  • Thanks: 0
Dear Administrator, Hello!

Thank you very much for your advice. Now I can insert data and retrieve data from the database, but I have another question to ask you. If I want to submit a form and update an SQL statement, can I use your Select query statement to modify it directly? What about updating statements? This is also a question for me, looking forward to the manager's reply, thank you, salute!

An example of my own hypothesis is as follows:

This - > execPieceByName ('ff_InitLib');

Db01 = JFactory:: getDBO (); //Get Database Object

Db01 - > setQuery ("Update SQL statement");

Tmp01 = $db01 - > loadResult ();



Is it possible to write like this?

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

Question urgently: Where is the file path of this submit button? 1 year 1 month ago #236952

  • mihaela
  • Offline
  • Developer
  • Developer
  • Posts: 3128
  • Karma: 105
  • Thanks: 415
Hello,

I'm glad I've helped.

Regarding your question about the update statement, please take a look at this topic crosstec.org/en/forums/1-forums/124409-b...ariables.html#227699 since here what you are asking is explained.

The correct syntax is the following:
$db->setQuery("UPDATE query"); 
$db->query(); 

Let me know whether this is working as you wanted.

Regards,

Mihaela

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

Question urgently: Where is the file path of this submit button? 1 year 1 month ago #236953

  • Topic Author
  • magicican
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 11
  • Thanks: 0
Thank you. I just posted a new question post. If you see it and approve it, please give me a help reply. Thank you. Thank you very much for the administrator team and salute you.

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

  • Page:
  • 1
  • 2
Moderators: ForumSupport
Time to create page: 0.048 seconds

BreezingForms Pro 1.4.7 for WordPress Released!

Available in the membership section.

Summer Sale!

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!