Loading ...
Sorry, an error occurred while loading the content.

drag n drop interface to adjust the display order

Expand Messages
  • geetanuj2002
    Hello, I have a bunch of images that I am displaying on a web page and their path info is stored in a MySQL database. I m using PHP and MySQL 5 (if that
    Message 1 of 5 , Dec 3, 2008
    • 0 Attachment
      Hello, I have a bunch of images that I am displaying on a web page and
      their path info is stored in a MySQL database. I'm using PHP and
      MySQL 5 (if that matters).

      I want to give the administrator the ability to go in and change the
      display order of the images to whatever order he likes, maybe I'll
      give him a drag n drop interface to adjust the display order.

      What is the best and most efficient method to store the display order
      in the database? Should I create a seperate table just for display
      order or just add a display order column to the DB? Thanks.
    • ankur
      hey, what about storing the display order in a field with , saprated value. no need to create new table also for the same. eg. say first time you have
      Message 2 of 5 , Dec 4, 2008
      • 0 Attachment
        hey,

        what about storing the display order in a field with "," saprated value.
        no need to create new table also for the same.

        eg. say first time you have 1,2,3,4,5,6
        then you can have 3,4,5,1,2,6
        then 1,2,3,6,5,4
        ....

        and while reading just explode it and use it.

        and the drag and drop thing you can do from any js tool kit like prototype,
        YUI or dojo or jQuery it will be so simple.

        --
        regards..

        On Wed, Dec 3, 2008 at 12:33 AM, geetanuj2002
        <anuj.phpdeveloper@...>wrote:

        > Hello, I have a bunch of images that I am displaying on a web page and
        > their path info is stored in a MySQL database. I'm using PHP and
        > MySQL 5 (if that matters).
        >
        > I want to give the administrator the ability to go in and change the
        > display order of the images to whatever order he likes, maybe I'll
        > give him a drag n drop interface to adjust the display order.
        >
        > What is the best and most efficient method to store the display order
        > in the database? Should I create a seperate table just for display
        > order or just add a display order column to the DB? Thanks.
        >
        >
        >


        [Non-text portions of this message have been removed]
      • Vinu Thomas
        You could use one of the JS libraries like Scriptaculous or jQuery to help with the drag n drop ui.
        Message 3 of 5 , Dec 6, 2008
        • 0 Attachment
          You could use one of the JS libraries like Scriptaculous or jQuery to
          help with the drag n drop ui.
          http://woork.blogspot.com/2008/02/drag-and-drop-to-order-list-elements.html
          http://www.isocra.com/2008/02/table-drag-and-drop-jquery-plugin/

          You can use a column in the same table to keep track of the order.

          Regards,
          Vinu

          --- In bang-phpug@yahoogroups.com, "geetanuj2002"
          <anuj.phpdeveloper@...> wrote:
          >
          > Hello, I have a bunch of images that I am displaying on a web page and
          > their path info is stored in a MySQL database. I'm using PHP and
          > MySQL 5 (if that matters).
          >
          > I want to give the administrator the ability to go in and change the
          > display order of the images to whatever order he likes, maybe I'll
          > give him a drag n drop interface to adjust the display order.
          >
          > What is the best and most efficient method to store the display order
          > in the database? Should I create a seperate table just for display
          > order or just add a display order column to the DB? Thanks.
          >
        • Udayakumar Sarangapani
          hi geetanuj if you dont want to use anything like scriptaclous/jquery then try the up and down arrow for moving the rows in the table by adding a column and
          Message 4 of 5 , Dec 8, 2008
          • 0 Attachment
            hi geetanuj
            if you dont want to use anything like scriptaclous/jquery then try the
            up and down arrow for moving the rows in the table by adding a column
            and updating the values just swapping...
            -U

            On 12/6/08, Vinu Thomas <vinuthomas@...> wrote:
            > You could use one of the JS libraries like Scriptaculous or jQuery to
            > help with the drag n drop ui.
            > http://woork.blogspot.com/2008/02/drag-and-drop-to-order-list-elements.html
            > http://www.isocra.com/2008/02/table-drag-and-drop-jquery-plugin/
            >
            > You can use a column in the same table to keep track of the order.
            >
            > Regards,
            > Vinu
            >
            > --- In bang-phpug@yahoogroups.com, "geetanuj2002"
            > <anuj.phpdeveloper@...> wrote:
            >>
            >> Hello, I have a bunch of images that I am displaying on a web page and
            >> their path info is stored in a MySQL database. I'm using PHP and
            >> MySQL 5 (if that matters).
            >>
            >> I want to give the administrator the ability to go in and change the
            >> display order of the images to whatever order he likes, maybe I'll
            >> give him a drag n drop interface to adjust the display order.
            >>
            >> What is the best and most efficient method to store the display order
            >> in the database? Should I create a seperate table just for display
            >> order or just add a display order column to the DB? Thanks.
            >>
            >
            >
            >
          • L Ravi Kiran
            You could use YUI too. Check this out http://developer.yahoo.com/yui/ Ravi Kiran ... From: Vinu Thomas To: bang-phpug@yahoogroups.com
            Message 5 of 5 , Dec 9, 2008
            • 0 Attachment
              You could use YUI too. Check this out

              http://developer.yahoo.com/yui/
              Ravi Kiran

              ----- Original Message -----
              From: "Vinu Thomas" <vinuthomas@...>
              To: bang-phpug@yahoogroups.com
              Sent: Saturday, December 6, 2008 1:57:39 PM GMT +05:30 Chennai, Kolkata, Mumbai, New Delhi
              Subject: [bang-phpug] Re: drag n drop interface to adjust the display order






              You could use one of the JS libraries like Scriptaculous or jQuery to
              help with the drag n drop ui.
              http://woork.blogspot.com/2008/02/drag-and-drop-to-order-list-elements.html
              http://www.isocra.com/2008/02/table-drag-and-drop-jquery-plugin/

              You can use a column in the same table to keep track of the order.

              Regards,
              Vinu

              --- In bang-phpug@yahoogroups.com , "geetanuj2002"
              <anuj.phpdeveloper@...> wrote:
              >
              > Hello, I have a bunch of images that I am displaying on a web page and
              > their path info is stored in a MySQL database. I'm using PHP and
              > MySQL 5 (if that matters).
              >
              > I want to give the administrator the ability to go in and change the
              > display order of the images to whatever order he likes, maybe I'll
              > give him a drag n drop interface to adjust the display order.
              >
              > What is the best and most efficient method to store the display order
              > in the database? Should I create a seperate table just for display
              > order or just add a display order column to the DB? Thanks.
              >
            Your message has been successfully submitted and would be delivered to recipients shortly.