[PHP] Display Records in Multiple Pages
I have 100 records in mySQL database and I need to display them in my web page using php and html. How to display them in multiple pages? Each page must contain 25 records. Does anyone know how to do it other than create 4 pages and manually list the records there? or maybe point me some reference please. Your help will be much appreciated. Thanks! Aqua
Re: [PHP] Display Records in Multiple Pages
The LIMIT function is working, thanks. But how to generate back / forward links using html/php? Thanks for your help. Aqua - Original Message - From: Justin French <[EMAIL PROTECTED]> To: Aqua <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, June 27, 2002 1:56 PM Subject: Re: [PHP] Display Records in Multiple Pages > Use the LIMIT function in your SELECT query... check out the MySQL manual... > and then generate back / forward links depending on your current offset. It > should be expandable to 1000 records without any mods to the code. > > Justin French > > > > on 27/06/02 4:54 PM, Aqua ([EMAIL PROTECTED]) wrote: > > > I have 100 records in mySQL database and I need to display them in my web page > > using php and html. How to display them in multiple pages? Each page must > > contain 25 records. Does anyone know how to do it other than create 4 pages > > and manually list the records there? or maybe point me some reference please. > > Your help will be much appreciated. Thanks! > > > > Aqua > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Display Records in Multiple Pages
Thanks! It's working. I got your point after I think about it. Below is my trial script. Sorry for bothering you guys since I'm a beginner. Thanks again. Aqua .. $sql = "select news_id, news_subj, news_precontent, news_content, news_home from news order by news_id limit $numInc,2"; ... Previous"; $numIncs = $numInc + 2; echo " / Next"; ?> .. - Original Message - From: Justin French <[EMAIL PROTECTED]> To: Aqua <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Thursday, June 27, 2002 3:09 PM Subject: Re: [PHP] Display Records in Multiple Pages > well, establish how many you want per page ($perpage = 25). > > so your first limit will obviously be 0 and 25. > > since the offset is 0, there is no back button page 1, and the forward > button is something like view.php?offset=25. > > then on subsequent pages, you use the $offset and $perpage to create the > LIMIT statement. the links are created by taking the $offset (currently 25) > and minusing/adding the $perpage figure. > > back > forward > > Then you only have to watch out to make sure that the forward button isn't > there on the last page of results. > > It's hard to explain, easy to implement. Just sit down and think it > through. > > > Justin French > > > > > on 27/06/02 5:55 PM, Aqua ([EMAIL PROTECTED]) wrote: > > > The LIMIT function is working, thanks. But how to generate back / forward > > links using html/php? Thanks for your help. > > > > Aqua > > > > - Original Message - > > From: Justin French <[EMAIL PROTECTED]> > > To: Aqua <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> > > Sent: Thursday, June 27, 2002 1:56 PM > > Subject: Re: [PHP] Display Records in Multiple Pages > > > > > >> Use the LIMIT function in your SELECT query... check out the MySQL > > manual... > >> and then generate back / forward links depending on your current offset. > > It > >> should be expandable to 1000 records without any mods to the code. > >> > >> Justin French > >> > >> > >> > >> on 27/06/02 4:54 PM, Aqua ([EMAIL PROTECTED]) wrote: > >> > >>> I have 100 records in mySQL database and I need to display them in my > > web page > >>> using php and html. How to display them in multiple pages? Each page > > must > >>> contain 25 records. Does anyone know how to do it other than create 4 > > pages > >>> and manually list the records there? or maybe point me some reference > > please. > >>> Your help will be much appreciated. Thanks! > >>> > >>> Aqua > >>> > >> > >> > > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP problem
I would like to know what this problem is. PHP has encountered an Access Violation at 01650AFD Thank You -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] problem with PHP
I would like to know what this mean`s. PHP has encountered an Access Violation at 01650AFD Thank You Mike harrell -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP problem
First off i`m using windows 2000 advance server with PHP 4.3 i believe it is.I can reboot my server and it will go away for awhile. http://syp-triple-h.com/webpost http://automotionsclub.com/guestbook that is some links that will show the access violation and it is at the end of the script. Thank You Mike H -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] RE:php and java applets
Java Applets cannot connect to the same host they were loaded from. They run on the client machine as a local program. I know this because I attempted to run an applet and have it connect to a mysql server the lived on the web server. It couldn't connect using localhost as the domain name of the server. ( Which due to security settings was the only URL I could connect from.) I could be wrong here, but all I know is from experience. After experimenting I came to this conclusion. >Am I? I thought that applets were allowed to connect to the same host they were loaded from. Which is what I'm trying to do. > >Nice site BTW, useful for a few other things I'm working on, thanks. > >Tom >On Sat, May 22, 2004 at 07:46:21AM +0600, raditha dissanayake wrote: > Tom Playford wrote: > > >That was my original plan. The problem is that if someone works out > >the commands needed to > >communicate with the php control page, they will be able to bypass the > >Java access control systems. > >I suppose I could use https, but does that encrypt the url and post data? > > > I think you have found yourself trapped in the java applet sandbox. You > need to create a signed applet. see > http://www.radinks.com/java/sandbox/ for a brief guide. > > all the best > > -- > Raditha Dissanayake. > - > http://www.raditha.com/megaupload/upload.php > Sneak past the PHP file upload limits. > -- Ben Ford Bio-Logic Aqua Technologies 5001 Lower River Rd Grants Pass, OR 97526 800-FOR-MIST (367-6478) [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php