Welcome Guest, Not a member yet? Register   Sign In
CodeIgniter App getting data from the wrong mySQL table?
#21

[eluser]xwero[/eluser]
I guess the subject, name and timestamp variables output is blog data, correct?
#22

[eluser]Dave Blencowe[/eluser]
Anything in the comments view is outputting comments, there is a separate view for blog data although the variables are very similar.

main_view.php
Code:
<center>
<table border="0" cellspacing="3" cellpadding="0" width="600px">
  <tr>
    <td colspan="2">&lt;?php echo $title; ?&gt;</td>
  </tr>
  <tr>
    <td rowspan="2">&nbsp;</td>
    <td style="padding-left: 10px;">&lt;?php echo(nl2br($post)); ?&gt;</td>
  </tr>
  <tr>
    <td style="padding-left: 10px;">&lt;?php echo("".$author." - ".$timestamp."");?&gt;</td>
  </tr>
</table>
#23

[eluser]xwero[/eluser]
The variables you add to the blog view are stored so if they are not overwritten by variables passed on to the comments view variables they will be displayed.

But the view for the comments you showed is only for one comment. If you make it a loop the problem should be solved.
#24

[eluser]Dave Blencowe[/eluser]
Made the loop earlier and it works.
Thank you very much for your time and consideration,
Dave




Theme © iAndrew 2016 - Forum software by © MyBB