• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Query a mySQL database and submit products to emai

Query a mySQL database and submit products to emai 12 years 8 months ago #18442

  • info9621
  • info9621's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
Hi there.
I have a mySQL DB with 100000 parts.
I was wondering if there is a way that RSForm could query this DB and a user then selects the parts they want to enquire about and sends an email.

An example of what I want to achieve is here

The CSV which I will build the mySQL database looks like this:

Part Number,Quantity,Description,Condition
508105264,3,CONNECTOR,NS
6911625PY(003),1,CONNECTOR,NS
88142,23,CONNECTOR,

Any help or pointers in the right direction would really help

Garry
The administrator has disabled public write access.

Re: Query a mySQL database and submit products to emai 12 years 8 months ago #18454

Hello,

You example is a search engine which generates a list with all parts.
RSForm! Pro can query the database and show a list of the results, but it's not easy to create a search box which passes the value to a other field where the query is stated and that the results needs to be passed to the next field.

It's not impossible but not easy.
I would say search a DBSearch extension which displays a list and create you own send button.

You can try it in RSForm! Pro, i use something like it.
Code for a field to select values from database:
//<code>
$items = "|-- Maak uw keuze --[c]\n";
$db =& JFactory::getDBO();
$db->setQuery("SELECT id, title FROM jos_categories WHERE extension = 'com_content' AND title != 'Branche' and title != 'Site' order by title asc");
$result = $db->loadObjectList();
 
foreach ($result as $r)
      $items .= $r->id . '|' . $r->title . "\n";
 
return trim($items);
//</code> 

In the attributes part of the field i use:
onchange="getDescription('category');"

The i use the following code to fill a field called category2
<script type="text/javascript">
function getDescription(param)
{
var index  = document.getElementById(param).selectedIndex;
var option = document.getElementById(param).options[index];
var test = option.text;
document.getElementById('category2').value = option.text;
}
</script>

This is how i passthrough values to a other field.
Regards
Wilco Alsemgeest

Please note: my help is not official customer support. To receive your support, submit a ticket by clicking www.rsjoomla.com/my-support-tickets.html
Last Edit: 12 years 8 months ago by wilco.alsemgeest.
The administrator has disabled public write access.
The following user(s) said Thank You: info9621

Re: Query a mySQL database and submit products to emai 12 years 8 months ago #18456

  • info9621
  • info9621's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
Thanks so much for your informative answer.
It looks like a bit of a headache, we'll have a go but it may be beyond us!

We're a web design company and willing to pay someone to get this working for us. Please email me if your interested in a bit of work and give you more details.
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!