Solved

Dynamic Pages & Dynamic Links

Posted on 2006-10-27
8
173 Views
Last Modified: 2011-10-03
Hi All

I'm looking for a routine that will create dynamic pages & dynamic links at the bottom of a page. Say I had a have a database with One-hundred links in it I would like it to print 10 links on 10 pages just like most search engines do. I'm looking to do this without the use of any modules.
0
Comment
Question by:blnukem
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
8 Comments
 
LVL 4

Expert Comment

by:vi_srikanth
ID: 17824595
Suppposing if u r using mysql, a query like the following would give the results in tens:

$query="SELECT * FROM mytable LIMIT $from_counter, 10";

You can pass the value of $from_counter through GET/POST method.
0
 

Author Comment

by:blnukem
ID: 17825103
vi_srikanth

I'm not runing mysql just a plain and simple text data base.
0
 
LVL 4

Expert Comment

by:vi_srikanth
ID: 17825122
Ok... You said supposing there are 100 links in ur text database, it should be shown as 10 pages with 10 links in each page. How do u want the result? Do u want them in 10 different text files? or Do u want them in a web page in which one page will be shown after other?... Basically if u explain what u r trying to do, it will be helpful.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:blnukem
ID: 17825297
10 seprate pages with 10 links on a page just like google, msn or ee return.
0
 
LVL 16

Accepted Solution

by:
manav_mathur earned 500 total points
ID: 17828405
Assuming that you have a webpage setup which has page numbers a s links, and on clicking one of those links, calls this script with 'pagenumber' as the parameter containing the pagenumber,

my $pagenum = param('pagenumber') ;
local @ARGV=('/path/to/databasefile') ;
my @entries = <> ;
print @entries[(10*$pagenum-1)..(10*$pagenum+9)] ;
0
 

Author Comment

by:blnukem
ID: 17830440
manav_mathur

Code works great for producing the page content but I also need it to produce
page numbers "LINKS + 10" at the bottom of the page to click through thouse links
should contain the $pagenum Value that will show page content 1=10 11-20 21-30 Ect...
0
 
LVL 16

Expert Comment

by:manav_mathur
ID: 17830488
you can hardcode them into the HTML.
Link for "page 1" should set pagenumber=0 and call this script.
Link for "page 2" should set pagenumber=1 and call this script.
...
...
0
 

Author Comment

by:blnukem
ID: 17830544
OK Thank You!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question