Welcome Guest, Not a member yet? Register   Sign In
How can i show custom SQL query result at view page
#1

[eluser]Unknown[/eluser]
hi everybody , i am really really newbie for codeigniter
i tried many frameworks , django , asp.net mvc & ruby on rails , after many unsuccesfull years , i decided to learn Codeigniter.
i am currently using 1.7.3 version related to bundle for e-editor/textmate support
i tried to several method foreach , as row , as result but i couldnt able to show my custom sql query on web browser

my query = "SELECT SUM( price )
FROM income
WHERE `date` >= DATE_SUB( CURDATE( ) , INTERVAL 30
DAY "

This query calculates price column total from income table in last 30 day
result to me three-digit number
i would like to show this query result on view page


my controller file:

function cashdepot()
{
}
my model file:

function cashdepot($income)
{
}

my view file related query:

i really i dont have any idea , what should i use.

please , can anyone write fill for me

function cashdepot() controller
{
}
function cashdepot($income)
{
}
and codes for view

Thanks for your kind helps from now




Theme © iAndrew 2016 - Forum software by © MyBB