Menu

Order of records in the admin portal?

Help
Linda
2005-09-16
2013-06-03
  • Linda

    Linda - 2005-09-16

    I save my form data in a MySQL database. I haven't been able to figure out how the data is sorted in the admin portal table. It's not sorted by id number or date, but I'd like it to be. Is there a way to accomplish this?

    Thanks in advance.

     
    • TNTEverett

      TNTEverett - 2005-09-16

      MySQL comes with it's own set of tools your server should be providing.  You can open the database with these tools and perform many other MySQL functions outside of the Admin portal.  The Admin merely displays the database as is and allows you to delete records.  It is not meant to be a fully functional database tool. 

       
      • Linda

        Linda - 2005-09-16

        True.. I can log into my server and perform a variety of tasks. But in the admin portal it's already hard to find a record that needs to be deleted; when there are a hundred records in there, it will be nearly impossible.

        I was assuming the admin portal pulls the date from the MySQL database, right? If so, then I was hoping there was some way to order it by id number.... It's not critical of course, but without it, the admin portal will end up not being useful at all.

         
    • TNTEverett

      TNTEverett - 2005-09-16

      I agree with you.  I have a few databases that are very large and had the same complaints.  You have to know that the Admin portal was not meant to be a database tool.  I believe the admin just displays records as they appear in the database (first come first served).  If you sort the db using MySQL tools and then save it, the admin tool will display the records differently but you still have the same large db to search. 
      I have, in my own forms, added a print all feature.  This allows me to print all which then displays all records in an html page.  I can then use the browser's "find (on this page)" tool to locate records.  It's a hackers way to get more functionality but it is usefull. 
      If memory serves me correctly I have also helped another person solve an issue with deleting records.  If you delete records, then redisplay the db and attempt to delete additional records, an error occurs because the record ID numbers are not what is expected.  I will try and locate this post.  It is not to old.  You may want to look at it in case you experience the same issue. 

       
      • Linda

        Linda - 2005-09-16

        You helped me with a printing records issue that sounds similar. I was getting blank output when clicking "print: the result was blank.

        Maybe that solution ffected the order of things in the portal?

        I'd be happy if the output in the portal was "first come first served". But it's not. And no matter how I sort the records in the MySQL database, the order doesn't change in the admin portal.

        My admin portal table order seems completely random to me... it probably really isn't, but there's no pattern I can find.

        Thanks again for helping... I appreciate all the time you take.

         
    • TNTEverett

      TNTEverett - 2005-09-16

      You are in the trail for this post on MySQL db delete and printer friendly issues.
      https://sourceforge.net/forum/forum.php?thread_id=1220603&forum_id=149299

       
    • TNTEverett

      TNTEverett - 2005-09-16

      It's coming back to me know.  I reviewed the other post.  from that there is a description of the SQL database that shows a db key number.  I now believe this key number is the determining factor on how the admin will display data. 
      I will have to confirm this using my sample db and MySQL tools.  If you want to explore yourself, see if you can see the db key when you use your own MySQL tools.  See it when you sort the db if the key numbers are modified (still sequential with the new sort order).  If so when you save the db it should open with a new sort order in the admin.  Be sure to refresh your browser to make sure there is no possibility of cached data being retrieved. 
      If you give me some time I can play with this tonight to see if I can identify a way to do what you want. 

       
      • Linda

        Linda - 2005-09-16

        Take all the time you need... as I said, it's a "gee it would be nice," but not a necessity.

        You lost me on the db key numbers. I can't find them, but I'm not very knowledgable about anything beyond the basics of the database.

        Let me know if you need any other info from me.

         
    • Linda

      Linda - 2005-09-23

      Any luck with this?

      Thanks.

       
    • TNTEverett

      TNTEverett - 2005-09-23

      Sorry, but no.  Last week I was sick and this week I'm playing catch up.  I hope to be able to spend some time on it this week.

       
    • TNTEverett

      TNTEverett - 2005-09-30

      OK, I've made some progress. 
      1.) In my forms the sql db is only used to store data.  The admin does not return the sql but rather a copy held in a data.dat file copy of all data entered or deleted. 
      2.) I have some changes to the index.php file to access the sql instead of the data.dat file. 
      3.) I been playing around with another admin tool. 

      So in reference to #3, what would you like to see in an admin tool? 

       
      • Linda

        Linda - 2005-09-30

        Changes I've made to the records through MySQL show up in the admin panel so somewhere along the line the data has to be retrieved from that database, right?

        Primarily, I'd like to keep the records in the order they were received. The first form that was filled out should be first on the list in the admin panel, the 2nd receieved is 2nd in the list, the 3rd is 3rd and so forth.

        But if I could have absolutely everything, I'd like to be able to sort the the table by any of the column headings.

        It's strange though... in my current admin panel, the first 15 or so records seem to be in some random order and the last 15 or so records are in the order they were received. So I'm even more confused  about what is going on......

         
    • TNTEverett

      TNTEverett - 2005-09-30

      I have an additional admin tool I'm working on.  Right now it is only working for SQL data.  I'll send you an email with the file attached.  Copy it to your admin directory and see what you think. 
      It's a work in progress so be patient. 

       
    • TNTEverett

      TNTEverett - 2005-09-30

      FYI, because I had chosen both SQL and data file in creating my forms, form data was written to both places.  The Admin tool however only chose to read the file data.  This had me confused for a bit because no matter what I did to the SQL data the admin tool always produced the same result.  This is why I created my own tool.  Later I will see about implementing my tool features into the normal Admin tool. 

       
    • TNTEverett

      TNTEverett - 2005-10-05

      Did you get this message?  I tried sending the file in SF mail but I think it killed the server.  Send me your email and I'll give you a copy of the script. 

      By: TNTEverett - tnteveret1
      RE: Order of records in the admin portal?  
      2005-09-30 12:30 
      I have an additional admin tool I'm working on. Right now it is only working for SQL data. I'll send you an email with the file attached. Copy it to your admin directory and see what you think. 
      It's a work in progress so be patient.

       
      • Linda

        Linda - 2005-10-05

        Sorry for the delay. I just sent you an email. Thanks!

         

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.