• 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: Inserting into a Table

Inserting into a Table 17 years 9 months ago #1038

  • princy
  • princy's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
Hello,
I just downloaded Try-out version this component and it looks great. I have a Q. for you -- Is it possible to insert the form Data to a custom table after a user hits Submit table.

I have tried following code on \"Script called on form process\"

$database->setQuery(\"INSERT INTO `#__insert_tst` (val_col, id_col) VALUES ('{title}', '{selectbox}')\");
$database->setQuery(\"INSERT INTO `#__insert_tst` (val_col, id_col) VALUES ({title}, {selectbox})\");

Above 2 do not insert any thing. Below mentioned works after hard coding the values but inserts 5 rows.

$database->setQuery(\"INSERT INTO `#__insert_tst` (val_col, id_col) VALUES ('title', '1')\");

I really require this for my case. Please let me know if/how it can be done.

BTW, your code here >> www.rsjoomla.com/component/option,com_ku...view/id,931/catid,2/ worked flawlessly and that was my other must have.

Thanks,
Princy
The administrator has disabled public write access.

Re:Inserting into a Table 17 years 2 months ago #1949

  • jasonjia
  • jasonjia's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
I think you need use insertObject instead of setQuery, because setQuery can only do query. You can find the usage of insertObject from this url: help.joomla.org/content/view/712/212/
The administrator has disabled public write access.

Re:Inserting into a Table 17 years 3 weeks ago #2693

  • smnhicks
  • smnhicks's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
Has anybody managed to achieve inserting form data into a custom table? If they have then I'd love to hear about how you did it because I'm struggling to work it out for myself!!
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!