• 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: update external table with data from dropdown

update external table with data from dropdown 3 years 2 months ago #40939

Hi, I have a very low knowledge on sql and scripts, but I believe my question is simple for those who understand sql

When I edit submission directory, I can update data with this code bellow, and it works with normal text field.

But if I try to grab data from a field that was insert by a listbox just shows word [array] at my external table (phpMyAdmin)


$submissionId = JRequest::getInt('id');
$db = JFactory::getDbo();
$db->setQuery("UPDATE #_external_table SET `field`= '".$_POST."'
WHERE `SubmissionId`='".$submissionId."'");
$db->execute();



Can someone help me telling what should be used instead '".$_POST."' (just when is data from a dropdown)

Thanks!
The administrator has disabled public write access.

update external table with data from dropdown 3 years 2 weeks ago #41109

I found the answer. Only need to use [0] - zero is the selected index


e.g: $db->setQuery("UPDATE #_external_table SET `field`= '".$_POST[0]."' .................
The administrator has disabled public write access.
The following user(s) said Thank You: gregs

update external table with data from dropdown 2 years 11 months ago #41169

  • sintcorp
  • sintcorp's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 15
por exemplo: $ db-> setQuery ("UPDATE #_external_table SET` field` = '".$_POST[0]'.......
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!