display $this->db->query(); |
[eluser]rochellecanale[/eluser]
hey guys i just want to ask how can i display the sql that comes from my $this->db->query? How can i display the output to the view? Here's my code. Code: $sql = "SELECT member_id,username,account_type,completion_date,total how can i view it? Should i use foreach()? or just echo $query? I have no idea please help me. And also i want to fetch the value of total, How can i do it? I want to store it in a variable and use it for comparing.
[eluser]LuckyFella73[/eluser]
It's clearly documented in the user guide: http://ellislab.com/codeigniter/user-gui...sults.html
[eluser]NikosV[/eluser]
First of all, i think i would be best for you if you re-read user guide (http://ellislab.com/codeigniter/user-gui...sults.html). In your view you should try something like this: Code: <?php
[eluser]rochellecanale[/eluser]
i tried that but it displays nothing. Here's my modified code: Code: my model
[eluser]rochellecanale[/eluser]
Ah ok i found my error in my view i forgot to include the () at the end of result_array thanks for the response guys.
|
Welcome Guest, Not a member yet? Register Sign In |