Questions tagged [sqlite2]

24 questions
25
votes
2 answers

PHP - SQLite vs SQLite3

I've made a web application using SQLite (2.8.17), I've only now discovered that there's an SQLite3. It somehow eluded my attention when making the web application, probably due to the lack of documentation for the php functions. I'm wondering, what…
ThunderLegs
  • 293
  • 1
  • 5
  • 10
5
votes
1 answer

SQLite - Is it possible to make a non-integer Primary Key work?

Thanks for reading and hopefully answering, Due to legacy issues and company policy, I am working with SQLite 2.8.17 and have a few varchars as primary keys. But when I run a "pragma integrity_check", it reports "rowid missing from index" and "wrong…
JJeff
  • 51
  • 2
4
votes
1 answer

SQLite : GROUP BY without Aggregate

I'm trying to understand a strange behaviour of GROUP BY on SQLite v2.8.17 Here is the code : _db->prepare('SELECT COUNT(*) AS c FROM (SELECT MAX(groupCode) FROM docs GROUP BY groupCode)'); $selectQuery =…
zenko
  • 147
  • 1
  • 8
3
votes
1 answer

Working with an old SQLite2 database

I have a really old, dusty SQLite 2 database lying around on my hard disk that I'd like to search around in. So far, I've tried opening it with tools such as sqliteman, sqlitebrowser, and simply trying to open it with sqlite3 in Python, but to no…
Naftuli Kay
  • 87,710
  • 93
  • 269
  • 411
2
votes
1 answer

SQLITE 2 Documentation

I am trying to find an online documentation for SQLite2. The project I have entered uses SQLite2 and I usually work with SQlite3. I did a google search and didn't find much. Thank you !
toto
  • 880
  • 11
  • 21
2
votes
5 answers

How to sanitize php input without mysql

I am trying to figure out a way to sanitize input going into sqlite from php. I cannot use mysql. Is it enough to simply use sqlite_escape_string or do I need to do anything else? Also I can only use sqlite2.
vman
  • 321
  • 4
  • 10
2
votes
3 answers

Get records from a specific month using SQLite

How would I write a SQLite query to select all records from a specific month? My dates are stored as Unix timestamps. PHP code is allowed in your solution if it's required. SQLite2-compatible queries only, please. :)
soren121
  • 368
  • 3
  • 16
2
votes
2 answers

Metadata for columns in SQLite v2.8 (PHP5)

How can I get metadata / constraints (primary key and "null allowed" in particular) for each column in a SQLite v2.8 table using PHP5 (like mysql_fetch_field for MySql)? sqlite_fetch_column_types (OO: $db->fetchColumnTypes) only gets column name and…
Kristoffer Bohmann
  • 3,986
  • 3
  • 28
  • 35
1
vote
4 answers

How to handle UTF-8 characters in sqlite2 to sqlite3 migration

Trying the easy approach: sqlite2 mydb.db .dump | sqlite3 mydb-new.db I got this error: SQL error near line 84802: no such column: Ð In that line the script is this: INSERT INTO vehiculo…
levhita
  • 2,161
  • 2
  • 21
  • 31
1
vote
1 answer

SQLite typlessness and PRIMARY KEY change

For some reason in searching for data types the SQLite 2 documentation SQLite 2 documentation on typlessness came up and I read up on typlessness. I later came to realize that version 2's last release was in 2004. I then searched for version's 3…
heretoinfinity
  • 1,528
  • 3
  • 14
  • 33
1
vote
1 answer

Command-line tool for SQLite 2.1?

Are there any command-line tools specifically for SQLite 2.1.
Sergey
  • 47,222
  • 25
  • 87
  • 129
1
vote
1 answer

How can I convert SQLite 2 to SQLite3 using Python on Windows?

I'm trying to convert a SQLite 2 file to SQLite3 using Python on Windows. On Linux, I'd just pipe a dump from sqlite to sqlite3: os.system("sqlite db.sqlite .dump | sqlite3 db3.sqlite") On Windows, I have no such convenient means of transferring…
JasonFruit
  • 7,764
  • 5
  • 46
  • 61
1
vote
1 answer

sqlite2: Joining max values per column from another table (subquery reference)?

I'm using the following database: CREATE TABLE datas (d_id INTEGER PRIMARY KEY, name_id numeric, countdata numeric); INSERT INTO datas VALUES(1,1,20); //(NULL,1,20); INSERT INTO datas VALUES(2,1,47); //(NULL,1,47); INSERT INTO datas…
sdaau
  • 36,975
  • 46
  • 198
  • 278
1
vote
0 answers

How to print list of columns in SQLITE 2 table?

In mysql class I have this method to print list of columns public function printMemberColumns(){ $n=-1; foreach (explode(',',CONFIG::tables) as $tab): $n++; $result = mysql_query( "SELECT `COLUMN_NAME` FROM `INFORMATION_SCHEMA`.`COLUMNS`…
John Boe
  • 3,501
  • 10
  • 37
  • 71
1
vote
1 answer

SQLite2 database conversion

So far all the examples of converting a SQLite2 database to SQLite3 or MySQL all answers assume that the person has access on their computer to the tools needed to do this conversion or access to specific folders on a webserver host. Can someone…
Mark Giblin
  • 1,086
  • 2
  • 13
  • 20
1
2