Hello
I try to make the part if text length up to 200 or more words
Example
[Part 1 = Title ]
Grandma, you’re a blessing. In so many ways, this family depends on your strength to hold us together. Because your generosity and love come naturally, ..... [Go To Part 2]
if page 2
[Part 2 = Title 2 ]
you don’t like to receive much attention for all the good that you do. Still, too often your sacrifices go unnoticed. Wishing you all the blessings. ..... [Go To Part 3]
i try to make this func like ..
if($page=="" || $page<=0)$page=1;
$noi = mysql_fetch_array(mysql_query("SELECT text, COUNT(*) FROM ibwf_blogs WHERE id='".$bid."'"));
$cnt = strlen($noi[0]);
if($cnt>100){
$num_items = 100;
}else{
$num_items = $noi[1];
}
$items_per_page= 1;
$num_pages = ceil($num_items/$items_per_page);
if($page>$num_pages)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
if($limit_start<0)$limit_start=0;
$sql = "SELECT uid, title, text, date, views FROM ibwf_blogs WHERE id='".$bid."' LIMIT $limit_start, $items_per_page";
Please kind help me ~
I try to make the part if text length up to 200 or more words
Example
[Part 1 = Title ]
Grandma, you’re a blessing. In so many ways, this family depends on your strength to hold us together. Because your generosity and love come naturally, ..... [Go To Part 2]
if page 2
[Part 2 = Title 2 ]
you don’t like to receive much attention for all the good that you do. Still, too often your sacrifices go unnoticed. Wishing you all the blessings. ..... [Go To Part 3]
i try to make this func like ..
if($page=="" || $page<=0)$page=1;
$noi = mysql_fetch_array(mysql_query("SELECT text, COUNT(*) FROM ibwf_blogs WHERE id='".$bid."'"));
$cnt = strlen($noi[0]);
if($cnt>100){
$num_items = 100;
}else{
$num_items = $noi[1];
}
$items_per_page= 1;
$num_pages = ceil($num_items/$items_per_page);
if($page>$num_pages)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
if($limit_start<0)$limit_start=0;
$sql = "SELECT uid, title, text, date, views FROM ibwf_blogs WHERE id='".$bid."' LIMIT $limit_start, $items_per_page";
Please kind help me ~
Comment