473,396 Members | 2,020 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Selection of records in list

Dear folks:

I was wondering how to query MySQL to display only a selection (1-20,
21-40) of a query in an HTML list. Can that be done in an SQL
statement, or do you have to use PHP to dissect the returned array
with for n elements to n+20 elements. How does Google achieve the
returning of results in its search engine. I imagine that the same
query may not necessarily be executed each page listing. I am
wondering whether the results from the query would return an array of
say 36000 elements.

Regards,
Jean Biver
Jul 19 '05 #1
2 1664
jb****@internet.lu (Jean Biver) wrote in message news:<f8**************************@posting.google. com>...
Dear folks:

I was wondering how to query MySQL to display only a selection (1-20,
21-40) of a query in an HTML list. Can that be done in an SQL
statement, or do you have to use PHP to dissect the returned array
with for n elements to n+20 elements. How does Google achieve the
returning of results in its search engine. I imagine that the same
query may not necessarily be executed each page listing. I am
wondering whether the results from the query would return an array of
say 36000 elements.

Regards,
Jean Biver


Read the MySQL manual at
http://www.mysql.com/documentation/m...ce.html#SELECT

and check out the 'LIMIT [offset,] rowcount' option. This will do
precisely what you want. I use it all the time.

Tony Marston
http://www.tonymarston.net/
Jul 19 '05 #2
jb****@internet.lu (Jean Biver) wrote in message news:<f8**************************@posting.google. com>...
Dear folks:

I was wondering how to query MySQL to display only a selection (1-20,
21-40) of a query in an HTML list. Can that be done in an SQL
statement, or do you have to use PHP to dissect the returned array
with for n elements to n+20 elements. How does Google achieve the
returning of results in its search engine. I imagine that the same
query may not necessarily be executed each page listing. I am
wondering whether the results from the query would return an array of
say 36000 elements.

Regards,
Jean Biver


Read the MySQL manual at
http://www.mysql.com/documentation/m...ce.html#SELECT

and check out the 'LIMIT [offset,] rowcount' option. This will do
precisely what you want. I use it all the time.

Tony Marston
http://www.tonymarston.net/
Jul 19 '05 #3

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

Similar topics

2
by: Erik Max Francis | last post by:
I was interesting in adding selection and hit testing to ZOE, and was looking at the PyOpenGL wrappers' handling of selection and picking. I see glSelectBuffer to specify the size of the buffer,...
1
by: Steve | last post by:
I have a continuous form with several unbound comboboxes in the form header. The comboboxes are used to provide criteria for the SQL of the form. The code behind the form looks like: Public Sub...
1
by: Annette Massie | last post by:
I would like to have a form that lists current addresses being used. On this form I would also like to have a command button that would allow the user to add an address if they do not see it...
1
by: Alex | last post by:
Acc97.. I have a database which records down-time on 8 machines, the selection of reasons comes from a combo box. I have tried to be clever! and limit the options relative to each machine within...
8
by: Steve Jorgensen | last post by:
Mailing List management is a good example of a case where my conundrum arises. Say there is a m-m relationship between parties and groups - anyone can be a member of any combintation of groups. ...
12
by: dbuchanan | last post by:
I am designing a table to contain a field to stores a value that must indicate none, one, or many choices. The form will have a group box with checkboxes (multi-choice) You see the records in...
12
by: tara99 | last post by:
I have combo box which displays col1 from a table1, I have a button "OK" next to it. I also have a listbox which I want it to displays other information (col2) from table1 for a particular records....
1
by: zufie | last post by:
Hi, When I make a selection from the drop down list of values on a Combo Box. The Combo Box is on a Form. The Combo Box selection appears on ALL of the records. That is, when I select one...
6
by: David Wright | last post by:
Hello Folks I am using Microsoft Access 2000 I would be grateful if someone could help me with “Dlookup”. I tried various methods of writing Dlookup and various events to trigger it, none of...
1
by: annemariearmour | last post by:
I am using Crystal reports version 11.2 to create reports. The data source is SQL Server, and I am using views rather than reporting directly from tables. I apply selection criteria to the incoming...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.