Welcome Guest, Not a member yet? Register   Sign In
String as an URL
#7

[eluser]georgerobbo[/eluser]
Okay. So say I created a function called Article in my default controller named Welcome. I would then route using routes.php in the config folder and enter

Code:
$route['welcome/article/(:num)'] = "welcome/article/article_lookup_by_id/$1";


How would I then get the information from the database to be passed into my view from the controller/model automatically depending on the ID selected?


Messages In This Thread
String as an URL - by El Forum - 09-06-2009, 09:50 AM
String as an URL - by El Forum - 09-06-2009, 02:03 PM
String as an URL - by El Forum - 09-06-2009, 02:05 PM
String as an URL - by El Forum - 09-07-2009, 12:26 PM
String as an URL - by El Forum - 09-07-2009, 04:05 PM
String as an URL - by El Forum - 09-07-2009, 05:14 PM
String as an URL - by El Forum - 09-08-2009, 06:24 AM
String as an URL - by El Forum - 09-08-2009, 06:28 AM
String as an URL - by El Forum - 09-08-2009, 07:07 AM
String as an URL - by El Forum - 09-08-2009, 07:55 AM
String as an URL - by El Forum - 09-09-2009, 12:07 PM



Theme © iAndrew 2016 - Forum software by © MyBB