$form->data('id'));TNX"> return array and id - Forums

Forums

return array and id

webkruter 14 Dec, 2014
i malke more, bu i can't return array by max id in table. This query is work, i need load to form. return array return first 'id' but me need and 'id'. Help plz!!!

How i can load this query to form by return array


$db->setQuery("SELECT fio1 FROM #__datatable_naryd_otd_ipm ORDER BY id DESC LIMIT 1");
return array('id'=>$form->data('id'));


TNX
GreyHead 14 Dec, 2014
Hi webkruter,

I'm sorry, I don't understand your question and the code you've posted doesn't look as if it would run correctly.

What are you trying to do?

Bob
webkruter 14 Dec, 2014
i can do return array in my form foк edit data from table

In bd read from condition i set

return array('id'=>$form->data('id'));

it work , data set in my form and i can edit him, But i have 1 problem return array() return data from table by first id in table. I need line from table where id max or end in table
GreyHead 15 Dec, 2014
Hi webkruter,

Please see this FAQ. You can use the : syntax to add a custom query.

Bob
This topic is locked and no more replies can be posted.