473,666 Members | 2,115 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to display data from same query on diffrent pages using next link????

when i run query i am getting thousands of records and i am displayaing
a particular no. of records on a single page say 100 records then i put
a link to go on next page. when user clicks on next page the another
100 records will be displayes so should i need to run the query again
to get records from 100 to 200 records ?????

thxs for help in advance.

Jul 17 '05 #1
6 1943
you need to add a limit to your sql
<?
if(!isset($minQ uery) || ($minQuery < 0)){
$minQuery = "0";
}
if(!isset($maxQ uery)){
$maxQuery = "100";
}
$sql = "SELECT * FROM table";
$sql .= " LIMIT ".$minQuery .", ".$maxQuery ";

?>
on your link to a page add ?minQuery=<? echo $minQuery-100; ?>&maxQuery=<?
echo $maxQuery + 100; ?>
hth
craig

"vishal" <vi************ @yahoo.co.in> wrote in message
news:11******** *************@z 14g2000cwz.goog legroups.com...
when i run query i am getting thousands of records and i am displayaing
a particular no. of records on a single page say 100 records then i put
a link to go on next page. when user clicks on next page the another
100 records will be displayes so should i need to run the query again
to get records from 100 to 200 records ?????

thxs for help in advance.

Jul 17 '05 #2
On 20 Apr 2005 03:46:58 -0700, vishal wrote:
to get records from 100 to 200 records ?????


http://dev.mysql.com/doc/mysql/en/select.html and use LIMIT.
--
Firefox Web Browser - Rediscover the web - http://getffox.com/
Thunderbird E-mail and Newsgroups - http://gettbird.com/
Jul 17 '05 #3
On 2005-04-20, vishal <vi************ @yahoo.co.in> wrote:
when i run query i am getting thousands of records and i am displayaing
a particular no. of records on a single page say 100 records then i put
a link to go on next page. when user clicks on next page the another
100 records will be displayes so should i need to run the query again
to get records from 100 to 200 records ?????


Use the keyword "pagination " for your next websearch.

--
Met vriendelijke groeten,
Tim Van Wassenhove <http://www.timvw.info>
Jul 17 '05 #4
can you tell me more about pagination. i don't know what u want to say
me by word pagination

Jul 17 '05 #5
Take a look at http://www.tonymarston.co.uk/php-mysql/pagination.html

--
Tony Marston

http://www.tonymarston.net
"vishal" <vi************ @yahoo.co.in> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. .
can you tell me more about pagination. i don't know what u want to say
me by word pagination

Jul 17 '05 #6
vishal wrote:
can you tell me more about pagination. i don't know what u want to say me by word pagination


'coz Tim Van Wassenhove thinks that you aren't aware the term used
for that. All (smart) programmers use Google
<http://www.google.com/>--only very few will find difficult in
searching as they may not be knowing the right keyword. So, Tim
provided you with the keyword that you have to use
("pagination ")--thinking that you're smart and use or at least will use
Google.

FWIW, <http://www.google.com/search?q=php+pa gination>

--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

Jul 17 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
4408
by: Rudy | last post by:
Hi all, I know this is easy, just can't seem to get it. I have a windows form, and a text box, with a value already in it. I need to add that value to a table. It's just one value, so the entire row doesn't get filled. I have a connection and all that stuff. Private Sub btnPlaceBet_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPlaceBet.Click ' Dim Myds As Footbet.DStable '...
13
3262
by: Jim Carlock | last post by:
I have over a hundred pictures I would like to present. Is it practical to create and parse an array of pictures, picture paths, et al using server-side scripting to accomplish this? I created an array already, and whereby, the HTML and Javascript currently used amount to about 14KB for each of four different pages, the PHP page I started working on is already over 35KB in size (most of it is server side processing creating the array...
3
3124
by: Bob Sanderson | last post by:
I am trying to create a form for a MySQL database similar to a spreadsheet. The idea is to display a list of records, with the last line of the list being an input form. When the user enters data in the form and hits the submit button, the data is entered and the form is reloaded with the new data displayed and another input form becomes the last line. Example --- Before entering new data
9
3109
by: sellcraig | last post by:
Microsoft access 2 tables table "data main" contains a field called "code" table "ddw1" is created from a make table query of "data main" Goal- the data in "code" field in needs to be inserted into a standard web address in the table (the filed name is link) in ddw1 Example address ---
18
2482
by: fishwick | last post by:
I haven't really done any css in quite a while, and am banging my head against the wall trying get the rudimentary layout together of a church website home page to display correctly - I don't want to continue work until I understand what I'm doing wrong. http://www.christchurchinfo.net The site displays nicely in Firefox/Mozilla and Safari, but the stained glass windows navigation portion is getting pushed down in IE, and the "news"...
1
2323
by: Objectifnet | last post by:
What I really want to do is to be able to link two pages together using an ID, The table involved displays an image stored on the File Server that has the image details stored in the Database called. THE Database used is MySQL "Support" on a Table Called "profiles": The problem is how do I get this piece of codes to link to a details page called "PATRONS_DETAILS.PHP" and display information about one particular database detail. With ID...
5
2755
by: PHPBABY3 | last post by:
Hi, 1. I have two SQL tables. I will call them employees and departments: EMP: LAST_NAME, FIRST_NAME, DEPTNM DEPT: NUM, NAME Input: text string FIND Output: the LAST_NAME, FIRST_NAME and department name NAME (link DEPTNM
24
4661
by: Phil Latio | last post by:
Let's say I have a simple web application running with just two MySQL tables. The tables structure is as follows: Table: category category_id (PK) category_name parent_category (FK) //references category_id in this table Table: link link_id (PK)
9
2069
by: tomhawkins1 | last post by:
Hi I currently have a site where users can upload files. These files can be doc, wmv, jpeg, xls, dwf, dwf and dwg. These files are uploaded to /home/**user**/uploads and not /home/ **user**/public_html/uploads to prevent any old user from browsing them. I then use a general showDoc page with the following function (from
0
8449
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8876
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8642
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7387
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5666
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4198
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4371
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2011
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1777
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.