RE: [PHP-DB] Next/Prev 10 lines
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 part in your query. Maybe something like this: YOUR rows displayed ... 1) { echo "GO TO PAGE NUMBER: "; for($i = 1; $i <= ($num_pages); $i++) { if($set_page_start == $page_start) { echo "$i "; } else { echo "$i "; } $set_page_start = $set_page_start + $page_limit; } ?> If you want to use PREV, NEXT instead of page numbers, just modify a little the second code paragraph. Merry Christmas to all ! Hynek Hynek Semecký www.semecky.com www.perlickovekoupele.cz Profi Web Hosting: http://www.web4u.cz/index.php?page=Programy&rid=2837 -Original Message- From: Steve Dodkins [mailto:[EMAIL PROTECTED]] Sent: 20. prosince 2002 16:16 To: [EMAIL PROTECTED] Subject: [PHP-DB] Next/Prev 10 lines 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? Regards Steve Dodkins IMPORTANT NOTICE The information in this e-mail is confidential and should only be read by those persons to whom it is addressed and is not intended to be relied upon by any person without subsequent written confirmation of its contents. ebm-ZIEHL (UK) Ltd. cannot accept any responsibility for the accuracy or completeness of this message as it has been transmitted over a public network. Furthermore, the content of this e-mail is the personal view of the sender and does not represent the advice, views or opinion of our company. Accordingly, our company disclaim all responsibility and accept no liability (including in negligence) for the consequences of any person acting, or refraining from acting, on such information prior to the receipt by those persons of subsequent written confirmation. In particular (but not by way of limitation) our company disclaims all responsibility and accepts no liability for any e-mails which are defamatory, offensive, racist or in any other way are in breach of any third party's rights, including breach of confidence, privacy or other rights. If you have received this e-mail message in error, please notify me immediately by telephone. Please also destroy and delete the message from your computer. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and/or publication of this e-mail message is strictly prohibited. If you have received this E-mail in error, or suspect that the message may have been intercepted or amended, please notify ebm-ZIEHL (UK) Ltd on +44(0)1245 468555. ebm-ZIEHL (UK) Ltd Chelmsford Business Park, Chelmsford, Essex CM2 5EZ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Catalog
I am ont interested in the code. I am interested in an idea of a database design. Not doing the first project neither. But anyway, I am sure it will be difficult. Thanks Hynek -Original Message- From: Snijders, Mark [mailto:[EMAIL PROTECTED]] Sent: 11. prosince 2002 13:09 To: 'Hynek Semecký ME'; Ignatius Reilly; [EMAIL PROTECTED] Subject: RE: [PHP-DB] Catalog jou want to make it yourself even without nowing how to code it or how to set up a database design??? just by looking to other code?? think it will be to hard for a first project.. just my idea... kind regards, Mark -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Catalog
Thanks. I took a look at the catalog design here (devshed.com) and I want to do something even more crazy. I want to assign different pricelists over all or some products. Product categories will have many to many relationship with products, sub-categories the same and I will also have different product styles with different prices. Each product will need to have or fixed or variable price Any idea about where I could take a look inside of SAP or something like this ? Thanks Hynek -Original Message- From: Ignatius Reilly [mailto:[EMAIL PROTECTED]] Sent: 11. prosince 2002 12:19 To: Hynek Semecký ME; [EMAIL PROTECTED] Subject: Re: [PHP-DB] Catalog lots of excellent resources on www.devshed.com, notably a PHPShop tutorial and a catalogue implementation. Ignatius - Original Message - From: "Hynek Semecký ME" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, December 11, 2002 11:54 AM Subject: [PHP-DB] Catalog > Hi list, > > I am trying to develop a product catalog using MySQL and PhP. > A long time I was looking for some tips for the database > structure. > The idea is to have a powerfull and as much as possible > universal DB application. > > Does anyone have an idea of a book, e-book, site, resource please ? > > Thanks > Hynek > > > > > > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Catalog
Hi list, I am trying to develop a product catalog using MySQL and PhP. A long time I was looking for some tips for the database structure. The idea is to have a powerfull and as much as possible universal DB application. Does anyone have an idea of a book, e-book, site, resource please ? Thanks Hynek -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Select Query Help...
This should work as well (newer syntax) ?: SELECT F.question, F.answer FROMFaqsAS F LEFT JOIN FaqsRelatedToProducts AS FP ON F.faqid = FP.faqid WHERE fgnumber = '$yourfgnumber' Use: SELECT DISTINCT ... when your FaqsRelatedToProducts table includes identical "fgnumber-faqid" rows. :) Hynek -Original Message- From: Ignatius Reilly [mailto:[EMAIL PROTECTED]] Sent: 10. prosince 2002 23:42 To: [EMAIL PROTECTED]; Michael Knauf/Niles Subject: Re: [PHP-DB] Select Query Help... Try: SELECT DISTINCT F.question, F.answer FROM Faqs AS F, FaqsRelatedToProducts Table AS FP WHERE F.faqid = FP.faqid DTH? Ignatius - Original Message - From: "Michael Knauf/Niles" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, December 10, 2002 8:53 PM Subject: [PHP-DB] Select Query Help... > > select query question > > OK, I have 3 tables > > Products Table > prodid > fgnumber > name > description > > Faqs Table > faqid > question > answer > > FaqsRelatedToProducts Table > fpid > fgnumber > faqid > > I want to select all the faq question and answer pairs that relate to an > fgnumber so I need to use both the Faqs table and the FaqsRelatedToProducts > table, how do I make that work? > > Michael > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php