Placeholder in Scheduled PHP Task.

pkjoshi

Active Member
I am trying to use placeholder in scheduled task php plugin like
{Tablename___element_name} which is not working.

Is there anything wrong with my setup? or
I need to do it in a different manner?

Thanks.
 
In your script file use something like
<?php
defined('_JEXEC') or die();
$data = $listModel->getData();
$data = $data[0];
foreach ($data as $row) {
$x = $row->table___element;
...
}
...
 
Thanks Troester.I will have a go the way you have suggested.
But then does it mean that you can't use placeholder the way we use in php box in other places.
 
The php plugin is running your script file once (so I assume it's just including the "PHP setup" once).

It doesn't do anything related to the rows of the list selected in the "Connection" (as e.g. the email schelude plugin does) so what should be in the placeholder?

In your script file you can access the list data and loop over the rows
(but you don't need to do anything related to the list, could also be something totally different)
 
Back
Top