Joomla! Discussion Forums



It is currently Thu Nov 26, 2009 1:16 am (All times are UTC )

 




Post new topic Reply to topic  [ 1 post ] 
Author Message
Posted: Fri Mar 07, 2008 8:18 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Tue Sep 20, 2005 11:30 pm
Posts: 178
Location: Oregon
Here's what I want to accomplish for my MVC component:

I am on an edit screen and have a link to a controller function that writes a file.

In the controller I need to retrieve the id of the record that was being edited so I can act on it for other queries related to the creation of the $filecontent for the file to be written.

I can't seem to get access to the proper row, either $cid or $id.

Here is what I've tried:

Code:
<?php
global $mainframe, $option;
      $id = JRequest::getVar( 'id', 0 );
      $cid    = JRequest::getVar( 'cid', array(0), 'post', 'array' );
      $id = $cid[0];


But when it comes to my query:

Code:
<?php
. ' WHERE mf.podcast_id = '.$id;
         $episodes = $db->setQuery( $query );
         $episodes = $db->loadObject();


I get nothing.

I have also tried:

Code:
<?php
$model2 = $this->getModel('xmlwrite');
$filecontent = $model2->filename;


Does anyone have some suggestions? How to reach a variable from an edit form.

_________________
Author of component Bible Study:
http://joomlacode.org/gf/project/biblestudy/


Top
   
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

Quick reply

 



Who is online

Users browsing this forum: cp21yos, ybong and 17 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group