Welcome Guest, Not a member yet? Register   Sign In
How can i make model query based on images
#3

(This post was last modified: 08-19-2015, 03:50 AM by freddy.)

Oh great thanks for comment, hem it's easy things after read the comments, thanks bro, how can i +1 or solved this thread Big Grin

edit 


How the last wuery show 2 last from 4 data itself. don't know how to figure it out so isu this twice here is my controller

Code:
$data['leftarticle'] = $this->model_front->lefttrend();

then here is view i use twice 
Code:
<!---articles 1 main-child--->
<?php
$row2 = $leftarticle->row_array(2);
$title2=$row2['art_title'];
$art_image2=$row2['art_image'];
$art_slug2=$row2['art_slug'];
?>

<div class="col-lg-12 child-articles-trend ">
    <img  src="<?php echo base_url() ?>uploads/article/<?php echo $art_image2 ?>" alt="<?php echo $title2 ?>">
<a href="<?php echo base_url()?>trend-article/<?php echo $art_slug2  ?>" ><h4><?php echo $title2 ?></h4>
</a>
</div>

and this show another view
Code:
<!---articles 1 main-child--->
<?php
$row3 = $leftarticle->row_array(3);
$title3=$row3['art_title'];
$art_image3=$row3['art_image'];
$art_slug3=$row3['art_slug'];
?>

<div class="col-lg-12 child-articles-trend">
    <img  src="<?php echo base_url() ?>uploads/article/<?php echo $art_image3 ?>" alt="<?php echo $title3 ?>">
        <a href="<?php echo base_url()?>trend-article/<?php echo $art_slug3  ?>" ><h4><?php echo $title3 ?></h4>
        </a>
</div>



It give me redudancy, how can i make right query based on your suggest in the last query, thanks
Reply


Messages In This Thread
RE: How can i make model query based on images - by freddy - 08-19-2015, 12:20 AM



Theme © iAndrew 2016 - Forum software by © MyBB