Jump to content

Dynamic displaying of 'tiles'


Go to solution Solved by Jessica,

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

  • Solution

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.

Lol.....what a shame :)

 

@mac_gyver I know what is a "tile" I've been working in construction areas when I came to Canada, but I really wanna thank you for this reply ;)

 

I cannot sleep well at last night.

Edited by jazzman1

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.