CodeIgniter: Showing Simple One DataTag: CodeIgniter, framework, mvc, database Category: PHP Frameworkpost: 26 Jan 2008 read: 3,318 CodeIgniter Step By Step Tutorial: After show all data, We learn how to show one data. We want a data with certain ID, example ID = 1. We still use same files with previous practice. For model: Open "employee_model.php" within CodeIgniter\system\application\models. Add following function:
For Controller: Open "employee.php" within CodeIgniter\system\application\controllers. Add following function:
For View: Open "employee_view.php" within CodeIgniter\system\application\views. Enter following code:
Now, test it. Point your browser to http://localhost/CodeIgniter/index.php/employee/get.
|
| | Give Your Opinion | Recommend |
|
1 Responses to CodeIgniter: Showing Simple One Data:
Dear Sir,
You tutorial is great and thank's for it but can i noticed for lines 18 on employee_model.php page, you write "getwhere", it should get_where. Please fix it :), it makes variable "query" not undifined.
Best Regards,
Saut M. Napitupulu
You tutorial is great and thank's for it but can i noticed for lines 18 on employee_model.php page, you write "getwhere", it should get_where. Please fix it :), it makes variable "query" not undifined.
Best Regards,
Saut M. Napitupulu





