This section allows you to view all Show Posts made by this member. Note that you can only see Show Posts made in areas you currently have access to.
1
it works.
Thnx a lot.
One more thing: If I put the query in SharedController and call with this
<?php
$comp_model = new SharedController;
$allcontent = $comp_model->cont();
?>
hence will it be secured the front-end?
2
Thanks a lot.
now created a function in ContentController
function cont(){
$db = $this->GetModel();
$sql = "SELECT * FROM content WHERE id = 1";
$allcontent = $db->rawQueryOne($sql);
return $allcontent;
}
and in view page I've call:
<?php cont(); ?>
<?php echo $allcontent['page_title']; ?>
but now not working...
have some example...?
Thnx.
3
I did this in info/help page:
<div class="container">
<h4>Help And Frequently Asked Questions</h4>
<hr />
<div>
Put page content here
</div>
<?php
$cmtc = new ContentController;
$db = $cmtc->GetModel();
$sql = "SELECT * FROM content WHERE id = 1";
$allcontent = $db->rawQuery($sql);
?>
<h2><?php echo $allcontent['page_title']; ?> <br>
<?php echo $allcontent['page_note']; ?></h2>
</div>
but still not working...
I don't need loops I just only need fields data.
4
How to ?
I want show multiple table fields in a single page (such a content management system)
For example:
In the info/help - page, i want to fetch few fields from two tables.
Like this: <?php echo $table_one[field_name]; ?> and <?php echo $table_two[field_name]; ?> or more
How to do that?