Гость
28 Апр 2013 12:20

What is the best way to import information from items of different types in other sections, but by the same user. E.g. Is it possible to have the favorite car of an author listed underneath their article?

For now I am using MySQL in a template witch gives me something like {"18":"Fiat panda","5":"Alwin"}

And I would like to convert this to 'Fiat panda'

$bestuurderid = $item->user_id;

$result = mysqli_query($con,"SELECT * FROM WLHjm_js_res_record WHERE user_id=$bestuurderid AND section_id=2 ");

$row = mysqli_fetch_array($result);

echo $row['fields'];

Последние изменения: 02 Март 2014


pepperstreet VIP
Total posts: 3,837
28 Апр 2013 23:24

You should have a look at the RECORDS field.


Sergey
Total posts: 13,748
29 Апр 2013 02:49

I agree you need records module. if it will not do what you want I can then give you suggestions on SQL. But better you use that module. It is not only get records it also renders them correctly.


Sergey
Total posts: 13,748
30 Апр 2013 00:24

Whole SQL was changed. Although DB looks not much different the way we SELECR records is completely different. I do not know how this feature would fit this module :)


Гость
05 Май 2013 06:19

Thanks guys,

Some how, while working with Cobalt I totally did'nt notice the 'record' field.

Having found this one helps me out with numerous problems I came across.

Thanks again!

Работает на Cobalt