[partially solved] link cells
- Single Page
Posted 31 May 2012 - 14:48 PM
I've attached a image of my table to try to explain better what I want to do.
This table consists of several JOINs.
For instance Service Windows is on the service_window table and contains description on how to order the service window, who to contact.. etc. etc..
What I want is when I press on "First Monday" under service Window, a popup/fancybox or redirected to a page displaying the other columns of the service_window table..
When I press on the customer name, I want to be redirected to the customer table..
Is that even possible?
If not, then I want to add button that displays the service window details.
Thanks,
Raboo
Posted 31 May 2012 - 16:51 PM
function _callback_servicewindow($value, $row)
{
return "<a href='".site_url('main/service_window/edit/'.$row->id)."'>$value</a>"; // This is line 52
}
function unique_field_name($field_name)
{
return 's'.substr(md5($field_name),0,8); //This s is because is better for a string to begin with a letter and not with a number
}
$crud->callback_column($this->unique_field_name('service_window_idservice_window'),array($this,'_callback_servicewindow'));
$crud->set_relation('service_window_idservice_window','service_window','name');
But I get this error:
A PHP Error was encountered
Severity: Notice
Message: Undefined property: stdClass::$id
Filename: controllers/main.php
Line Number: 52
Posted 04 June 2012 - 18:22 PM
But solution is
{
return "<a href='service_window/edit/$row->service_window_idservice_window'>$value</a>";
}