|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Display table data by id
My website currently displays all data. Ordered by id
What I would like to do is display only a few rows and have the automatic option to "read more..." Read more would be a link to another page that would display only that entry based on it's id. But it would display extra rows as well as the original. I need to know how to create a link based on the id. Site: http://cbcowasso.org Main article is what I would like to shorten and add a link to read more. |
|
#2
|
|||
|
|||
|
RE: Display table data by id
Hey man its very simple use limit in mysql statements to get rid off all the data and aply more link when count of rows returned is equal to count that you wanna
for more link.. I think you get that if not chat me online on yahoo .. Bye |
|
#3
|
|||
|
|||
|
RE: Display table data by id
Hello.
<?php $desc = $row['article_text']; $article_text = substr($desc,0,200); // 200 is a number of characters from your article that you pull from DB, you can change that number echo "$article_text ...<br>"; echo "<a href="go_to_article.php?id=$article_id">Read more</a><br><br>"; ?> Hope that helps! |
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Applications > Display table data by id |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|