Hello,
I'm working on a web site which have a page for the admin
to browse the clients table in a database.
To facilitate the interaction, I'm ORDERing BY Name...
The pagination buttons in this page are something like:
href=.?Page=7
and when loaded, it will
SELECT * FROM
is not zero, then add one to the max pagenumber
- Original Message -
From: Nuno Oliveira [EMAIL PROTECTED]
To: mysql@lists.mysql.com
Sent: Friday, January 12, 2007 10:04:34 AM GMT-0500 US/Eastern
Subject: Row position in table when sorted?
Hello,
I'm working on a web site which have
Rolando Edwards wrote:
I think you need this syntax
SELECT * FROM Clients ORDER BY Name LIMIT offset,rows
Your offset must be rows per page * pagenumber where minimum pagenumber is 0
You should also count the full result set
divide that count by the number of rows per page
to get the last page
[EMAIL PROTECTED] (Nuno Oliveira) wrote in
news:[EMAIL PROTECTED]:
My problem/question is how can I know the link for each one of these
found records??? Which is the offset for the LIMIT???
The way to retrieve individual records is by id, not by LIMIT n, m:
SELECT * FROM Clients WHERE id
,
Jerry Schwartz
Global Information Incorporated
195 Farmington Ave.
Farmington, CT 06032
860.674.8796 / FAX: 860.674.8341
-Original Message-
From: Nuno Oliveira [mailto:[EMAIL PROTECTED]
Sent: Friday, January 12, 2007 10:05 AM
To: mysql@lists.mysql.com
Subject: Row position in table when
Jerry Schwartz wrote:
Now that I re-read your question, I think your answer is that the LIMIT
clause applies to the set of records retrieved after all of the conditions
are applied. In your example,
SELECT * FROM clients WHERE name LIKE Mark% ORDER BY name LIMIT 1, 7;
Then
SELECT * FROM
[EMAIL PROTECTED] (Nuno Oliveira) wrote in
news:[EMAIL PROTECTED]:
(Off-Topic: I'm using Thunderbird/1.5 Gmail and I do a Reply All
which sends the messages to the person I'm replying and CC's to the
list but I never receive my own messages. Is this the normal behavior?
Thanks)
Looking at