Hi,
i like to update the cb table comprofiler when a form get submitted.
I am using 1.5 and newest version of cf.
Where i have to put the SQL statement?
When i put it in the autogenerted code, it`s get stripped off after saving.
When i put it in On Submit code - after sending email:
(PHP code with tags)
Nothing gets updated...
I tried the UPDATE statement via myadmin, which works...
<?php
$database = &JFactory::getDBO();
$database->setQuery("UPDATE #__comprofiler SET cb_plz='12345' WHERE user_id='78';");
?>
thx
M
i like to update the cb table comprofiler when a form get submitted.
I am using 1.5 and newest version of cf.
Where i have to put the SQL statement?
When i put it in the autogenerted code, it`s get stripped off after saving.
When i put it in On Submit code - after sending email:
(PHP code with tags)
Nothing gets updated...
I tried the UPDATE statement via myadmin, which works...
<?php
$database = &JFactory::getDBO();
$database->setQuery("UPDATE #__comprofiler SET cb_plz='12345' WHERE user_id='78';");
?>
thx
M
Hi tullski,
Any of these places should work Ok - but you probably need to add $database->query(); to execute the query.
Bob
Any of these places should work Ok - but you probably need to add $database->query(); to execute the query.
Bob
Bob,
you are right - forget to execute.
Now it`s working with onsubmit.
In Autogenerated code, the php code will get deleted after saving.
Anyway - it`s working.
Thx again.
M
you are right - forget to execute.
Now it`s working with onsubmit.
In Autogenerated code, the php code will get deleted after saving.
Anyway - it`s working.
Thx again.
M
at BETA 2 you can connect to the CB table and post your user id and it will get updated automatically without writing any SQL!
Cheers
Max
Cheers
Max
This topic is locked and no more replies can be posted.