I prepared 2 files, "1.php" and "2.php".
"1.php" is like this.
<?php
$dbh = new PDO('sqlite:test1');
$dbh->beginTransaction();
print "aaa<br>";
sleep(55);
$dbh->commit();
print "bbb";
?>
and "2.php" is like this.
<?php
$dbh = new PDO('sqlite:test1');
$dbh->beginTransaction();
print "ccc<br>";
$dbh->commit();
print "ddd";
?>
and...
Is it possible to dump only part of a database? I have a database containing 250'000 entries. I want to create a second one with a tenth of the data in it...
using
select * from table where id % 10 = 0
and setting
.output out.sql
yields a file that does not have the binary data encoded in the same way as when using
.dump
dump ->...
I am working on a name record application and the information is stored in a SQLite database. All columns in the database are TEXT types, except for the date of birth column, which is a DATETIME. The original Access database that I transferred to the SQLite database allowed nulls for the date of birth, so when I copied it over, I set all...
I've done a bit of reading related to the concurrency issues with sqlite, but I don't see how they'd apply to Django since it's inherently single threaded. I'm not using any multiprocess modules either. I have absolutely no experience with concurrent programming either, so if someone can identify WHY the following code is causing an Oper...
Is it always necessary to create a database for the user in an adobe air application or can you ship an empty database as part of the distributed app?
...
I have a number of objects, each one have an arbitrary number of shared, and distinct property-value pairs (more specifically: files, and their related properties -such as width, and height values for images, album/artist/length for music files, etc). I'd like to be able to search for objects having specific property/values (such as: by ...
Hi,
I have some code which I've been using to query MySQL, and I'm hoping to use it with SQLite. My real hope is that this will not involve making too many changes to the code. Unfortunately, the following code doesn't work with SQLite:
cursor.execute(query)
rows = cursor.fetchall()
data = []
for row in rows
data.append(row["column...
I am doing some prototyping for a new desktop app i am writing in Python, and i want to use SQLite and an ORM to store data.
My question is, are there any ORM libraries that support auto-generating/updating the database schema and work with SQLite?
...
Is there a SQL editor that supports SQLite databases and also features schema intellisense?
I can't seem to find anything out there.
...
It seems like a dumb question, and yet. It could be my IDE that's goofing me up. Here's the code (this is generated from DbLinq):
SELECT pics$.Caption, pics$.Id, pics$.Path, pics$.Public, pics$.Active, portpics$.PortfolioID
FROM main.Pictures pics$
inner join main.PortfolioPictures portpics$ on pics$.Id = portpics$.PictureId
WHER...
I'm writing some c++ code that uses the sqlite3 library. I'm using a prepared statement to which I bind a variable at runtime.
How do I examine the SQL query in the statement after the bindings?
For example, the code below doesn't return a row. When using a premade string and sqlite3_exec, I get the results I expect.
sqlite3_stmt *sta...
I am playing around with getting some basic stuff to work in Python before i go into full speed dev mode. Here are the specifics:
Python 2.5.4
PyQt4 4.4.3
SqlAlchemy 0.5.2
py2exe 0.6.9
setuptools 0.6c9
pysqlite 2.5.1
setup.py:
from distutils.core import setup
import py2exe
setup(windows=[{"script" : "main.py"}], options={"py2exe" : ...
When developing a mobile application on Windows Mobile, what are some of the database choices you've made?
Why did you make that choice? In particular we've got a mobile app that we're building which will have up to 360,000 records in some of the tables.
We were planning to use SQLCE 3.5 but we've got a number of drawbacks when working...
Hello, guys
I am working on a so-called Behavioral Risk Factor Surveillance System (BRFSS), a web query system dealing with questionnaires coming every year.
I had hard time in coming up with a suitable database design for it. Here is the problem: Each questionnaire contains about 80 questions, with demographic info, e.g. age, educati...
I wish to create a report that would list all the tickets that were closed in a certain period of time.
The pseudo-code would be like
SELECT * FROM tickets
WHERE closed AND date_closed = 'january 2009'
The part I am unable to resolve is date_closed = 'january 2009'.
Is there a way to do it in Trac?
I am not interested in particular...
How do I check if an sqlite query returned anything before I stop looping through results.
//see if there are results and do something if not
while(sqlite3_step(selectstmt) == SQLITE_ROW)
{ /*process on reults */}
...
I'm wondering how SQLite implements it. Is it based on file-locking? Surely the entire DB isn't locked for every user that accesses it; that would be extremely inefficient. Is it based on multiple files or just one big file?
Would be nice if someone could give a short overview of how synchronization and locking is done in sqlite, or, o...
I'm working on an iPhone application with a few data relationships (Author -> Books for example). When a user deletes an Author object from the application, I have a few SQLite triggers that run on the delete to remove any books from the database that have a foreign key matching the Author's primary key.
I'm also using a trigger to i...
Learning the basics of XML for the first time from W3C tutorials. How are most XML files generated? Does the server side application usually print a complete XML file to be parsed each time there is new data?
I have a CGI application in C and it includes the SQLite API. Is the best way to do some sort of printf to a XML file (using my ...
I get only the second value inserted into the database. dataHold.Id has a value, as does aTextField. However, when I look at the database, the Id isn't being inserted. Is the sqlite below correct?
const char *sql = "insert into Userdata (Id, Name) Values(?, ?)";
sqlite3_stmt *selectstmt;
if(sqlite3_prepare_v2(database, sql, -1, &se...