Question urgently: Where is the file path of this submit button?

  • magicican
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 10
  • Thank you received: 0

magicican replied the topic: Question urgently: Where is the file path of this submit button?

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.
#236910
  • Posts: 2553
  • Karma: 87
  • Thank you received: 343

mihaela replied the topic: Question urgently: Where is the file path of this submit button?

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
#236923
The following user(s) said Thank You: magicican
  • magicican
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 10
  • Thank you received: 0

magicican replied the topic: Question urgently: Where is the file path of this submit button?

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?
#236936
  • Posts: 2553
  • Karma: 87
  • Thank you received: 343

mihaela replied the topic: Question urgently: Where is the file path of this submit button?

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
#236952
  • magicican
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 10
  • Thank you received: 0

magicican replied the topic: Question urgently: Where is the file path of this submit button?

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.
#236953
Moderators: ForumSupporttomeperica
Time to create page: 0.068 seconds

New Icon Packs Category!

Crosstec is now offering icon packs.

If you are a paying subscriber, icon packs are automatically added to your account.

Check out our icon packs page!

Live Support Chat Opened!

Join our Discord chat here to receive live support and talk directly to the team!

Summer Sale!

50% discount on all of our extension subscription plans, templates and icon packs!

Get Your Subscription Here

News and Updates

Get informed about new downloads, updates and more in our News and Updates newsletter.

All Extensions Subscription

Get 1 year access to all of our current and future products and 1 year of professional support -- 99 for just 49! (Summer Sale)

No support per domain or website installation limits! Includes all of our current and future Joomla!® extensions, Joomla!® templates for the duration of your membership. This means, by purchasing an All Extensions Subscription you'll have it all covered!

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!

Live Support Chat Opened!

Join our Discord chat here to receive live support and talk directly to the team!

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here