Access another table from a block

Permalink
Hi !

I need for a block a 2nd table to access, so I have 2 tables in the db.xml and this works fine.

But....
How can I access the second table with ADODB_Active_Record?

The standard block table works fine (add, delete block, and so one).

From a block template I will access the 2nd table to display the table data.

Can I use concrete5 helpers, function for this or should I implement it in 'plain' PHP?

Please can anybody help me?

wguggen
 
Remo replied on at Permalink Reply
Remo
just use adodb..

$db = Loader::db();
$result = $db->query('SELECT bla WHERE ID=?', array($id));
while ($row = $result->FetchRow()) {
  print_r($row);
...
wguggen replied on at Permalink Reply
wguggen
Thanks, is it not possible to use ActiveRecord?
Only "plain" SQL?

This website stores cookies on your computer. These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media. To find out more about the cookies we use, see our Privacy Policy.