Mysql从1个查询中选择第二行

时间:2017-11-05 04:57:46

标签: php mysql

你是怎么做到的,我们可以在fetch中找到查询的第2行?

www.mydomain.com/logout

我使用了一段时间进行查询

Query : select * from news where id_category_news = '1'

我想要

第1行将采取:

while($event_res = mysqli_fetch_array($event_query))

和第2行:

                        echo '<article class="post">
                            <a class="image_thumb_zoom" href="#" title="'.$event_res['title_news'].'">
                            <img width="371" height="177" src="dist/images/dummy/shutterstock_58382248-371x177.jpg" class="attachment-post-first wp-post-image" alt="shutterstock_58382248">
                            </a>
                            <h4 class="post-title">
                            <a href="#" title="'.$event_res['title_news'].'">'.$event_res['title_news'].'</a>
                            <span class="date">'.TimetoDate($event_res['time_news']).'</span>
                            </h4>
                            <p>'.$event_res['text_news'].'</p>
                        </article>
                        ';

1 个答案:

答案 0 :(得分:0)

为什么你没有一个整数增加,因为它通过这样的行:

$ sed -E 's/(.{30}\S*).*/\1/' file
StackOverflow Users Are Brilliant
相关问题