The Following User Says Thank You to Markkyboy For This Useful Post: | ||
|
2017-10-13
, 19:48
|
|
Posts: 433 |
Thanked: 727 times |
Joined on Oct 2012
@ Costa Blanca, Espaņa
|
#12
|
The Following User Says Thank You to Markkyboy For This Useful Post: | ||
|
2017-10-13
, 20:04
|
Posts: 177 |
Thanked: 427 times |
Joined on Sep 2017
|
#13
|
The Following User Says Thank You to suicidal_orange For This Useful Post: | ||
|
2017-10-13
, 20:25
|
Posts: 1,048 |
Thanked: 979 times |
Joined on Mar 2008
@ SF Bay Area
|
#14
|
select * from stations order by "station";
The Following User Says Thank You to uvatbc For This Useful Post: | ||
|
2017-10-13
, 20:26
|
Posts: 177 |
Thanked: 427 times |
Joined on Sep 2017
|
#15
|
PRAGMA table_info(stations);
CREATE TABLE temp_table (id INTEGER PRIMARY KEY, station TEXT, favourite INTEGER) ;
INSERT INTO temp_table (station, favourite) SELECT station, favourite FROM stations ORDER BY STATION ASC ;
DROP TABLE stations ;
ALTER TABLE temp_table RENAME TO stations ;
|
2017-10-13
, 20:35
|
|
Posts: 433 |
Thanked: 727 times |
Joined on Oct 2012
@ Costa Blanca, Espaņa
|
#16
|
Markyyboy, how exactly are you trying to retrieve data?
Have you tried the following SQL statement:
The Following User Says Thank You to Markkyboy For This Useful Post: | ||
|
2017-10-13
, 21:00
|
|
Posts: 433 |
Thanked: 727 times |
Joined on Oct 2012
@ Costa Blanca, Espaņa
|
#18
|
The Following User Says Thank You to Markkyboy For This Useful Post: | ||
|
2017-10-13
, 21:16
|
Posts: 1,048 |
Thanked: 979 times |
Joined on Mar 2008
@ SF Bay Area
|
#19
|
Due to my browser throwing a wobbly/multiple posts/etc, there is an overlap, your command suggestion is exactly what I came up with, while it sorts it on screen, the list is still not sorted in the device - I am doing this by SSH, straight into the DB (this also requires that the temp DB created by the app found in '.config/harbour-nationalrail/' must be removed beforehand).
Presumably you have a Sailfish device, head to Jolla Store and download NationalRail app. By doing this, you will have the 'stationsDB.sqlite' file found in '/usr/share/harbour-nationalrail/data' folder
The sqlite list is out of date, there are more than 18 new stations to add to the list.....or I am now thinking the file should be made from scratch and incorporate a way to make updating easier in future releases.
|
2017-10-13
, 22:04
|
Posts: 177 |
Thanked: 427 times |
Joined on Sep 2017
|
#20
|
wow!, hats off to you suicidal_orange (is that a colour or a depressed fruit?), thank you!
.....so let me get this straight, you never used sqlite before and yet within a couple of hours, you got it sorted!, bloody genius!.
So, as I append new stations, will I have to do the same maneuvers?
thanks,
Mark
https://www.dropbox.com/s/9e0298pzki...RIALS.rar?dl=0
..oO(Don't just sit there standing around, pick up a shovel and sweep up!)Oo..