this is a cron job script which has no view, so it is expected that
the screen would be blank when i run it for testing. The only way I
know it is not working properly is that there are no new records in
the database table. Here is all the relevant code again. I
simplified the naming of the table/model.
the table is named os_choices
here is my model:
<?php
class OsChoice extends AppModel {
var $name = 'OsChoice';
var $belongsTo = array('User', 'Week', 'Item', 'OptionalShare');
}
?>
here is my controller:
<?php
class OsChoicesController extends AppController {
var $name = 'OsChoices';
}
?>
the script runs from the BoxesController, which var $uses =
array('OsChoice', etc.....) Here is the relevant snippet of boxes/
closeoutweek:
//now make a new record for the item in the os_choices table
$this->OsChoice->create();
$new_entry = array(
'OsChoice' => array(
'week_id' =>
$current_shown_week_id,
'optional_share_id' =>
$share_user['OptionalShareUser']
['share_id'],
'user_id' =>
$share_user['OptionalShareUser']['user_id'],
'item_id' =>
$share_user['OptionalShareUser']
['current_product_id']
)
);
set('new_entry', $new_entry);
$this->OsChoice->save($new_entry);
setting the variable to the view is not effective either, so it seems
that $new_entry is not even getting made. I have been stuck for a day
now trying to get this to record some data. Any ideas?
On Dec 17, 11:36 pm, roundrightfarm <[email protected]> wrote:
> Yes, its set to 2
>
> On Dec 17, 11:23 pm, Geoff Douglas <[email protected]> wrote:
>
>
>
>
>
>
>
> > Do you have you core Configure debug level set to 2?
> > (In config/core.php)
>
> > Errors won't display if you don't have debug turned on.
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php