[eluser]boltsabre[/eluser]
Firstly, I think you'll need two model functions to achieve the functionality you want. First call, to make the list on the LHS, the second to populate the RHS with the relevant data. For the sake of maximising efficiency and minimising the workload the DB has to do, I'd make your first query, for the LHS, return just the fields you need. Your current query:
Code:
$qs = "SELECT * FROM mcd_events WHERE published='1'";
is pulling ALL the information from the DB table, where as I think you only need the id, created_on, and title yes? Change your query to this
Code:
public function getLeftNavigationList(){
$qs = "SELECT id, created_on, title FROM mcd_events WHERE published='1'";
... rest of code
And then you want a second model function to just get the stuff you need for the RHS (description), like such:
Code:
public function getRightDetails($id){
$qs = "SELECT description FROM mcd_events WHERE id=$id";
... rest of code
[/code]
This is much better, a tiny little bit more coding, two functions instead of one, but it should be obvious the advantages (your code is now more modular and the DB workload is much less!)
Okay, so you now have two different model functions returning the correct data. You'll now need a controller to handle them. Perhaps a controller (index, or another one? your choice of naming conventions) to display the page on the first load, displaying the LHS list, with no data in the RHS because the user hasn't clicked on one yet. That's fairly simple, you just need to pass the data from your model function getLeftNavigationList to the view and iterate through the result to make your list. You seem to have a handle on that, so I won't go into it.
Then in your view, set up anchor links, as you have, passing the $id. Direct there links to a controller, which is set up like such (getting the $id, and passing it to the correct model function):
Code:
public function getRHSDetails($id){
if($id){
call your model getRightDetails($id)
}
process the result if you need to.
load view with this data
}
Anyway, that's it in a nutshell. Get that figured out and working first like cideveloper said - always design for javascript disabled, and if you have the time/budget, then integrate JS cool stuff!
Once you have the above working, google around for some "CodeIgniter AJAX tutorials". That'll help you integrate some client side funky functionality.