Re: [PHP-DB] Next/Prev 10 lines

2002-12-20 Thread Jason Wong
On Friday 20 December 2002 23:16, Steve Dodkins wrote: Has anyone got some code that will correctly display the next 10 line of a table with prev and next working? Or point me in the right direction for help? Search the archives. This kind of question gets asked (and sometimes answered) every

RE: [PHP-DB] Next/Prev 10 lines

2002-12-20 Thread Cal Evans
check out php.weblogs.com ADODB does this for you. =C= * * Cal Evans * The Virtual CIO * http://www.calevans.com * -Original Message- From: Steve Dodkins [mailto:[EMAIL PROTECTED]] Sent: Friday, December 20, 2002 9:16 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Next/Prev 10 lines Has

RE: [PHP-DB] Next/Prev 10 lines

2002-12-20 Thread Hynek Semecký ME
First you have to find how many rows would make your SELECT query in case you would not use LIMIT from, num. Then you have to divide this by number of rows per page and use it in the SELECT query. Then to your number of pages displayed on your page you add links to the first number of the LIMIT

Re: [PHP-DB] Next N Interface

2002-09-30 Thread Brad Bonkoski
I did something like this with a photo gallery I made. The approach I took is the execute a query, get the number of rows, and divide that number by how ever many records I wanted on that page. Then that would give me the number of total pages I would have for my navigational links at the

Re: [PHP-DB] Next N Interface

2002-09-30 Thread Mark Lee
How about appending LIMIT _GET[startrow],5 to the end of your query. The first parameter to LIMIT is the start position and the second is the number of rows to return. Does this help, or am I misunderstanding your question? Mark Lucas Novæ Matrix wrote: Hello, I am trying to create a

Re: [PHP-DB] Next N Interface

2002-09-30 Thread Brad Bonkoski
That would actually work for just getting a certain number of records from a query, but you would have to execute another query to figure out the navigational links he said he wants on the bottom...like google has, 1 2 3 4 5 . So, when I attacked it I figured one query is better then two even

RE: [PHP-DB] Next N Interface

2002-09-30 Thread John W. Holmes
That would actually work for just getting a certain number of records from a query, but you would have to execute another query to figure out the navigational links he said he wants on the bottom...like google has, 1 2 3 4 5 . So, when I attacked it I figured one query is better then two

RE: [PHP-DB] next prev links for search result

2002-08-27 Thread joakim . andersson
-Original Message- From: Smita Manohar [mailto:[EMAIL PROTECTED]] Sent: Monday, August 26, 2002 8:26 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] next prev links for search result hiii.. i want page no. and next prev links while displaying search result. the script which im

RE: [PHP-DB] Next birthday?

2002-03-08 Thread Robert V. Zwink
The simple answer might be: SELECT member.* FROM `member` WHERE DAYOFYEAR(member_dob) = DAYOFYEAR(CURDATE()) ORDER BY member_dob DESC LIMIT 1 Seems to work for me. The problem is that it wouldn't support members that have a birthday on the same day :) To solve that I would select the next

RE: [PHP-DB] Next birthday?

2002-03-08 Thread Kristjan Kanarik
On Fri, 8 Mar 2002, Robert V. Zwink wrote: The simple answer might be: SELECT member.* FROM `member` WHERE DAYOFYEAR(member_dob) = DAYOFYEAR(CURDATE()) ORDER BY member_dob DESC LIMIT 1 Seems to work for me. Not for me. I think it should be ordered like this: ORDER BY

Re: [PHP-DB] Next

2001-11-14 Thread Andrey Hristov
Use sessions. (session_start() and session_register()), and at the start of the test save row_ids(question_ids) in arrray which you make with session_register a session variable. On other pages you do session_start() and after that you have access to the array. Regards, Andrey Hristov IcyGEN

RE: [PHP-DB] Next

2001-11-14 Thread Rick Emery
Pass the current question number in a parameter to the next page in the URL. In the following, the PHP variable would track your current page: print A href=\myform.php3?page=$page\Next/A; - then, in myform.php3: ?php $page++; display the question for this

RE: [PHP-DB] NEXT - PREVIOUS coding

2001-07-16 Thread Tom Hodder
rough and readysomething like this should work... $pagesize = 20; $page = $page ? $page : 1; $pages = ceil(mysql_num_rows( $results ) / $pagesize ); mysql_data_seek( $results, ($page - 1) * $pagesize ); while( ($row = mysql_fetch_object( $results )) ( $counter++ $pagesize) ) { //

Re: [PHP-DB] next previous record

2001-02-22 Thread Lennin Arriola
Keep a counter of the rows you have fetched. so when you want to go back call mysql_data_seek ($Result, Counter-1); then mysql_fetch and you've got the previous row. Lennin Arriola [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail:

Re: [PHP-DB] next previous record

2001-02-22 Thread JJeffman
iginal- De: Andrew Hill [EMAIL PROTECTED] Para: Dreamvale [EMAIL PROTECTED]; [EMAIL PROTECTED] Enviada em: quinta-feira, 22 de fevereiro de 2001 14:10 Assunto: RE: [PHP-DB] next previous record You want to use Cursors, and I don't believe MySQL supports cursors yet,