Welcome Guest, Not a member yet? Register   Sign In
only pull one row from db to display problem
#6

[eluser]Craig A Rodway[/eluser]
In that case, you should read the page about URLs in the user guide.

Quote:The first segment represents the controller class that should be invoked.
The second segment represents the class function, or method, that should be called.
The third, and any additional segments, represent the ID and any variables that will be passed to the controller.

From your example, mysite.com/events will call the index function of the event controller - which will work OK. But when you try to go to mysite.com/events/868, it will not work because the 868 function doesn't exist in the events class.

You have two options - make the URL include index mysite.com/events/index/868; or add a manual route like this using Routing.

Code:
$route['events/(:num)'] = 'events/index/$1';


Messages In This Thread
only pull one row from db to display problem - by El Forum - 01-10-2010, 01:56 PM
only pull one row from db to display problem - by El Forum - 01-10-2010, 01:58 PM
only pull one row from db to display problem - by El Forum - 01-10-2010, 02:35 PM
only pull one row from db to display problem - by El Forum - 01-10-2010, 02:45 PM
only pull one row from db to display problem - by El Forum - 01-10-2010, 02:47 PM
only pull one row from db to display problem - by El Forum - 01-10-2010, 02:57 PM
only pull one row from db to display problem - by El Forum - 01-10-2010, 03:07 PM



Theme © iAndrew 2016 - Forum software by © MyBB