1
votes

This relates to Drupal 6 and Views 2.

I'm not new to Drupal, but I am new to problematically using Views.

I have a custom view defined in a module which is integrated with data like this (I think):

$view->base_table = 'tblName';

I am integrating a third-party API. It returns me a pretty vanilla PHP object.

I need a way for list returns from that API to become the base_table for the view, on the fly. Is this possible? The ugly solution I was think of was making every return item a node, and then using those as the "base_table". I think that would work, but it seems ugly. I don't want a bunch of nodes hanging around for later.

Any suggestions? Thanks.

1

1 Answers

0
votes

I'm not sure this is a good idea, but I ended up creating a routine based around Drupal's caching mechanism. I'm droping and creating a table on the fly and handing that table to Views. The table is populated every five minutes by the API. It can be forcibly re-populated by clearing the Drupal cache.

I tried using MySQL Temporary tables, but they didn't persist well enough. I wonder if there is a way to make them more connection-persistent, or to last a certain amount of time.