Jump to content

Dynamic displaying of 'tiles'


DaveyK

Recommended Posts

Hey freakers,

 

I am using PDO and php 5. something. Regardless, I am craeting a tile like interface. These tiles are fetched from the database, but I need to define the order in which theyre displayed. So this is both a PHP/database question. Say I have 4 tiles, tile 1 till tile 4 and I wish to order them 3, 1, 4, 2. What tips do you guys have ? I can imagine a static order but thats not really ideal is it. I could set each tile to have a static position, so first second third and so forth, but I would really love to calculate this on the go since the design is fluid. I have no idea where to start on this :/

 

Do any of you guys know a solution to this? Share some wisdom!

Link to comment
https://forums.phpfreaks.com/topic/278435-dynamic-displaying-of-tiles/
Share on other sites

  On 5/27/2013 at 3:26 PM, jazzman1 said:

Why you should have 4 titles?

 

A table should not have repeating values and columns itself!

 

Google - "Database optimization" or EXPLAIN your table data here.

Tiles. Not titles.

 

OP: Your table that stores the information should have a column (called something like orderBy [but not order because thats reserved]) and you can order them in there, then ORDER BY in your clause. You can look at creating a nice interface for actually ordering them using jQuery's sortable plugin.

lol, jazzman, you might need to test your vision too -

 

tiles:

1.a thin slab or bent piece of baked clay, sometimes painted or glazed, used for various purposes, as to form one of the units of a roof covering, floor, or revetment.
2.any of various similar slabs or pieces, as of linoleum, stone, rubber, or metal.

You guys all make cute couples. Lol.

 

@Jessica, so what you are saying is: just store the position of every box and update them if you need to. I am not using jQuery, this project involves no JS.

I thought of that, just wanted to check if that is in fact the best solution

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.