WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.8 is now available!


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Bakery Shop »
  • combine items of several pages into one bakery page
  • Print
Pages: [1]   Go Down

Author Topic: combine items of several pages into one bakery page  (Read 5271 times)

Offline Bug

  • Posts: 237
combine items of several pages into one bakery page
« on: May 11, 2011, 09:39:13 PM »
something i cannot figure out by myself

I collect several items from other pages into an extra bakery page,

I made a new field called 'brand'

i added a piece of code
Code: [Select]
// Query items (for this page)
$query_items = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_bakery_items WHERE brand = '".$soortselectie."' AND active = '1' AND title != '' ORDER BY title DESC");
$num_items = $query_items->numRows();
}

the order of the items is not alphabetic but alphabetic-per-(items per page) ..

i.e.:
i collect

a, b, c and d from page 1,
a1, b1 and c1 from page 2
a2, b2, c2 from page three

all have the extra field "mybrand"

result in the "mybrand" page is:

a
b
c
a1
b1
c1
a2
b2
c2

it has to be
a
a1
a2
b
b1
b2
c
c1
c2

anyone knows what I am missing here?



Logged

freeSbee

  • Guest
Re: combine items of several pages into one bakery page
« Reply #1 on: May 12, 2011, 09:47:41 AM »
Hi Bug

1. ORDER BY page_id ASC
2. ORDER BY title DESC

Code: [Select]
// Query items (for this page)
$query_items = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_bakery_items WHERE brand = '".$soortselectie."' AND active = '1' AND title != '' ORDER BY page_id ASC, title DESC");
$num_items = $query_items->numRows();
}

Regards Christoph
Logged

Offline Bug

  • Posts: 237
Re: combine items of several pages into one bakery page
« Reply #2 on: May 12, 2011, 10:38:29 PM »
Hi freesbee,

Where to start...

I really admire your work, and thank tou for the bakery...I know about Order by title etc, I made a zillion changes in the bakery. I made a sort option, a discount option, a new way of paginationdisplay etc. As soon as i got the last things done i will send you a copy for you to decide what to use.

Meanwhile I found out what it was, i had to call the new value 'brandselect' from the database.

Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Bakery Shop »
  • combine items of several pages into one bakery page
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2