Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Реале&

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: Russian
View previous topic :: View next topic  
Author Message
VlastV
Smarty n00b


Joined: 30 Oct 2004
Posts: 1
Location: Russia

PostPosted: Sat Oct 30, 2004 11:19 am    Post subject: Реале& Reply with quote

Все новости хранятся в базе данных MySQL. Надо на странице выводит допустим по 10 новостей. Как лучше реалезовать и в плане скорости и в плане ресурсов?
Back to top
View user's profile Send private message
PbIXTOP
Smarty n00b


Joined: 08 May 2006
Posts: 1
Location: Russia, Angarsk

PostPosted: Mon May 08, 2006 11:26 am    Post subject: Reply with quote

Лично я делаю так
Code:

$page=$_GET['page'];//получение номера страницы
$result=mysql_query("select COUNT(*) from news");
$count=mysql_fetch_row($result) OR 0;
$count=$count[0];
$news_num=10; //Количество новостей на странице
$result = mysql_query("select * from news limit ".($page-1)*$news_num.",".$news_num);
Back to top
View user's profile Send private message
kost
Smarty Rookie


Joined: 24 Jan 2006
Posts: 33
Location: Kiev, Ukraine

PostPosted: Sat Jul 08, 2006 2:38 pm    Post subject: Reply with quote

Простите. Smarty здесь при чем???
_________________
[ru]
http://phpstones.blogspot.com
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: Russian All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP