Hi All
Firstly, thank you for the whole CB development and the amazing support that you offer. The tutorials and webinars are a great help. Keep it up!
My problem:
I am trying to update database fields using the CODE type of auto action.
I have to create / update SOBIPRO entries. New Sobipro entries are created over a number of tables. The process I have tracked and understand so it shouldn't be difficult to create new entries. Updating existing ones is easier on a single table.
BUT
I have a problem using the CODE type of auto action. (Using QUERY I can easily perform single queries but as I have a number of queries to perform and different conditions depending on whether a user is creating a new entry or updating an entry it could get very clunky that way. )
The trigger works fine on QUERY.
But what am i doing wrong for the CODE type???
(All the queries all work when using QUERY)
For simplicity, here is a simple example that still doesn't work for me.
trigger onAfterUserUpdate
user AUTOMATIC
access ALL REGISTERED USERS
method PHP (eval)
return SILENT
Code:
$db = JFactory::getDbo();
$query ="INSERT INTO #_sobipro_field_data (fid,sid,baseData) VALUES (98,99,'hello')";
$db->setQuery($query);
THis query doesn't get processed.
Please point out the obvious to me.
Am I connecting to the database ok?
Many thanks
ED