SQLite Forum

Integer becomes blob
Login
checking columns:

item_id datatype: int64

ts datatype: int64

overallPrice datatype: int64

overallQuantity datatype: int64

buyingPrice datatype: int64

buyingQuantity datatype: int64

sellingPrice datatype: int64

sellingQuantity datatype: int64

last 10 records send:

('Twisted trousers (t1)', 24409, 1587486, 350000, 1, 350000, 1, 0, 0)

('Inquisitors mace', 24417, 1587481, 475116000, 1, 0, 0, 475116000, 1)

('Nightmare staff', 24422, 1587486, 47120001, 5, 47133000, 3, 47100502, 2)

('Nightmare staff', 24422, 1587488, 47200000, 1, 0, 0, 47200000, 1)

('Nightmare staff', 24422, 1587490, 47399332, 3, 47210009, 1, 47493994, 2)

('Nightmare staff', 24422, 1587493, 47215007, 1, 47215007, 1, 0, 0)

('Twisted blueprints', 24463, 1587488, 16034999, 1, 16034999, 1, 0, 0)

('Twisted horns', 24466, 1587484, 13740000, 1, 13740000, 1, 0, 0)

('Eldritch orb', 24517, 1587493, 116598000, 1, 116598000, 1, 0, 0)

sql command
INSERT OR IGNORE INTO rsbuddy("item_name","item_id","ts","overallPrice","overallQuantity","buyingPrice","buyingQuantity","sellingPrice","sellingQuantity") values (?,?,?,?,?,?,?,?,?)


the data that i get returned:

1154998	Nightmare staff	b'f_\x00\x00\x00\x00\x00\x00'	b'"9\x18\x00\x00\x00\x00\x00'	b'\xa4A\xd3\x02\x00\x00\x00\x00'	b'\x03\x00\x00\x00\x00\x00\x00\x00'	b'\x19^\xd0\x02\x00\x00\x00\x00'	b'\x01\x00\x00\x00\x00\x00\x00\x00'	b'j\xb3\xd4\x02\x00\x00\x00\x00'	b'\x02\x00\x00\x00\x00\x00\x00\x00'

1154999	Nightmare staff	b'f_\x00\x00\x00\x00\x00\x00'	b'%9\x18\x00\x00\x00\x00\x00'	b'\x9fq\xd0\x02\x00\x00\x00\x00'	b'\x01\x00\x00\x00\x00\x00\x00\x00'	b'\x9fq\xd0\x02\x00\x00\x00\x00'	b'\x01\x00\x00\x00\x00\x00\x00\x00'	b'\x00\x00\x00\x00\x00\x00\x00\x00'	b'\x00\x00\x00\x00\x00\x00\x00\x00'

1155000	Twisted blueprints	b'\x8f_\x00\x00\x00\x00\x00\x00'	b' 9\x18\x00\x00\x00\x00\x00'	b'\xb7\xac\xf4\x00\x00\x00\x00\x00'	b'\x01\x00\x00\x00\x00\x00\x00\x00'	b'\xb7\xac\xf4\x00\x00\x00\x00\x00'	b'\x01\x00\x00\x00\x00\x00\x00\x00'	b'\x00\x00\x00\x00\x00\x00\x00\x00'	b'\x00\x00\x00\x00\x00\x00\x00\x00'

1155001	Twisted horns	b'\x92_\x00\x00\x00\x00\x00\x00'	b'\x1c9\x18\x00\x00\x00\x00\x00'	b'\xe0\xa7\xd1\x00\x00\x00\x00\x00'	b'\x01\x00\x00\x00\x00\x00\x00\x00'	b'\xe0\xa7\xd1\x00\x00\x00\x00\x00'	b'\x01\x00\x00\x00\x00\x00\x00\x00'	b'\x00\x00\x00\x00\x00\x00\x00\x00'	b'\x00\x00\x00\x00\x00\x00\x00\x00'

1155002	Eldritch orb	b'\xc5_\x00\x00\x00\x00\x00\x00'	b'%9\x18\x00\x00\x00\x00\x00'	b'\xf0$\xf3\x06\x00\x00\x00\x00'	b'\x01\x00\x00\x00\x00\x00\x00\x00'	b'\xf0$\xf3\x06\x00\x00\x00\x00'	b'\x01\x00\x00\x00\x00\x00\x00\x00'	b'\x00\x00\x00\x00\x00\x00\x00\x00'	b'\x00\x00\x00\x00\x00\x00\x00\x00'


this python code converts it back to integers just fine:

lambda x: int.from_bytes(x,byteorder='little')

which returns:

1154998	Nightmare staff	24422	1587490	47399332	3	47210009	1	47493994	2

1154999	Nightmare staff	24422	1587493	47215007	1	47215007	1	0	0

1155000	Twisted blueprints	24463	1587488	16034999	1	16034999	1	0	0

1155001	Twisted horns	24466	1587484	13740000	1	13740000	1	0	0

1155002	Eldritch orb	24517	1587493	116598000	1	116598000	1	0	0


because the data is not stored as integer I cannot query it.

i would love to select * from rsbuddy where item_id=24422;