Mysql and HTML only

Mysql and HTML only

NetorgreenNetorgreen Posts: 10Questions: 1Answers: 0
edited January 2014 in General
Hi,

I just tested mysql with datatables the result was: http://list.lowendserv.net/test/
HTML: http://list.lowendserv.net/test.php
As you can see the mysql version is a bit squeezed, how can i fix this?

Thanks

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    You could add:

    [code]
    table.dataTable tbody td {
    white-space: nowrap;
    }
    [/code]

    to your CSS.

    Allan
  • NetorgreenNetorgreen Posts: 10Questions: 1Answers: 0
    Thanks that fixed it, but when i also sorting on the Mysql Version it dosen't function correct.
    As example: When i press on Memory on the HTML version it sorts correctly, when i try the same in the mysql version it dosent sort correctly.

    Any idea?
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    You are using server-side processing in your "mysql" example, so it is the database / sql that is doing the sort. That's where the problem lies - it would need to be able to correctly sort whatever data you've got in that column. I'm not sure how you would do that if you've got strings rather than numbers in there - someone in a MySQL forum might be able to say.

    Allan
  • NetorgreenNetorgreen Posts: 10Questions: 1Answers: 0
    I use hidden colums to sort, for example database screen:
    http://cdn.ikarusbasis.info/dl/screenshots/2014-01-10_120514.png
    My Sort in javascript:
    http://cdn.ikarusbasis.info/dl/screenshots/2014-01-10_120605.png
    Serverprocessing:
    http://cdn.ikarusbasis.info/dl/screenshots/2014-01-10_120659.png

    Did i something wrong? because its the same configuration as HTML.
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    As I say, what is your data type? I'm guessing its not a number, or is it?
  • NetorgreenNetorgreen Posts: 10Questions: 1Answers: 0
    pricen/memoryn is a string because of the point, it cant be an integer. Would that be a problem?
  • NetorgreenNetorgreen Posts: 10Questions: 1Answers: 0
    No idea?
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    It would be a problem if the string is something like "32GB" since that is a string and not a numeric value. As I mentioned, if your data is in that form, you will probably want to ask in a MySQL forum how to sort it as expected. The database is sorting it correctly at the moment (I surmise), but as a string. I don't know how you would have it sort pre-formatted data. I suspect the advise you will receive is to make it numeric data and format it at display time.
  • NetorgreenNetorgreen Posts: 10Questions: 1Answers: 0
    I found a way, fixed. But the last thing. sometimes i need to click 2 times on a row until it sort?
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    > But the last thing. sometimes i need to click 2 times on a row until it sort?

    On a row, or a column header? Its the header than needs to be clicked upon.

    I've just tried your page at http://list.lowendserv.net/test/ and it seems to work okay in that regard for me.

    Allan
  • NetorgreenNetorgreen Posts: 10Questions: 1Answers: 0
    edited January 2014
    Thanks for your help.
This discussion has been closed.