Hi ,
Thanks John. I am writing an extension. What I am trying to do is a lookup from a field to another channel.
So in this channel I have say tour names and their prices. In other channel I am storing the tour type.
What I want to do is when commiting the second channel entry I am performing a lookup to the first channel to get the price adn then do some calculations with it.
Hope this makes sense.
Have a look at the channel_entries_model, although limited it might help with what your doing.
$entry_data = $this->EE->channel_entries_model->get_entry( $entry_id,$channel_id);you have to pass a channel_id to get all the data for a entry. which you can get using the same call, but without the second parameter, like this
$query = $this->EE->channel_entries_model->get_entry( $entry_id);
$channel_id = $query->row('channel_id');I wonder if there is a better way to do this???
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.