titan_boy Posted November 12, 2015 Posted November 12, 2015 Hello, I need to get the data from a database from the back. It needs to start from the back. how can i do this. it is for the rows in a gridlist but it takes the data from the wrong side. the newest data go under now. It need to take the last row first. I can not use: 'guiGridListInsertRowAfter' because if i use this the script don't works good because the gridlist have some row limits ect. srry for my bad english. EXAMPLE: now i have it like this: row1: testtest row2: test row3: testtest123 row4: lalalala i want it like this: row4: lalalala row3: testtest123 row2: test row1: testtest I hope someone can help me.
izcream Posted November 12, 2015 Posted November 12, 2015 checkout mysql select query. search in google with keyword "mysql select orderby" it's will help u
titan_boy Posted November 12, 2015 Author Posted November 12, 2015 Hello, i try to find anything but i didnt find the thing what i want. @izcream Maybe there is a way to INSTERT a data in a database before all other data? example: data: 1: hahaha 2: lololol 3: testest new data after adding a new thing in the data: 1: newnewnew 2: hahaha 3: lololol 4: testest
ALw7sH Posted November 12, 2015 Posted November 12, 2015 for i=1,50 do print(table[50-i]) end Ansert them to your gridlist like that from the last value to the first There's another ways but this might be the easiest one
titan_boy Posted November 12, 2015 Author Posted November 12, 2015 @ALw7sH Thank you, but can you show me an example how to put this in a code?
Addlibs Posted November 12, 2015 Posted November 12, 2015 can't you just use the ORDER BY function in the SQL query? SELECT column1,column2,column3 FROM table ORDER BY column1 DESC -- (ASC is default)
titan_boy Posted November 12, 2015 Author Posted November 12, 2015 @MrTasty can you show me how to put that in this code?: dbQuery(con, "SELECT action FROM dbase WHERE zalop=? LIMIT 0, 20", zalop)
titan_boy Posted November 12, 2015 Author Posted November 12, 2015 oh i found how to do it. thank you everybody!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now