In MySQL you enter dates (datetime field) in the format 2009-10-16 21:30:45. Which makes it simple to insert times into the database.
$date = date('Y-m-d H:i:s', $timestamp);
Will this format work with SQLite and PostgreSQL? If not, what format do they use?
...
when using data source=|DataDirectory|\mydb.sqlite in visual studio 2008 i can not see the tables in query builder and in dataset designer. How can i fix this?
it is a web application for .net 3.5
thanks a lot
...
Hi all,
I have the following nhibernate cfg file:
<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
<property name="connection.driver_class">NHibernate.Driver.SQLite20Driver</property>
<property name="connection.connection_string">Data Source=dbFile.db;Version=3</property>
<property name="di...
I have a SQLite database of notes that have columns _id, title, details, listid
_id is the auto incremented primary key
title and details are string data fields
listid is a foreign key pointing to a list name in another table.
I'd like to find a way to have notes that are in multiple lists or notes that are linked in such a way tha...
I will be storing datetime values in an SQLite database (using Delphi and the DISqlite library). The nature of the db is such that it will never need to be transferred between computers or systems, so interoperability is not a constraint. My focus instead is on reading speed. The datetime field will be indexed and I will be searching on ...
I'm working on a Rails application that is multi-threaded. A user can start a tool from a web-form that may take several minutes to finish and that writes status-updates in the database (the tool is started in a separate thread). The user can check the current status on a status-page that refreshes itself regularly and reads the current ...
Can you create functions in SQLite like you can in MSSQL?
If so, how? What is the syntax?
Thanks
...
Hi,
In Android when you upgrade a database all data is lost. I'm going through a phase of development right now that is forcing many database upgrades. I don't want to lose all my data (and have to manually re-enter it) each time I upgrade my database. I would like to store my data in flat files and load those flat files into their re...
we have 3 tables: grandfathers, fathers, sons.
grandfathers have many fathers, and fathers have many sons, through the foreing keys grandfather_id and father_id.
Each record has only one property, the name of the person.
What I want is to have a list of all grandfathers, each with a field called grandsons_names which is the csv of all ...
How do I group query results by the hour part of a datetime column in SQLAlchemy?
...
Basically i have multi threads that adds data into a queue via SQLite. I have another one thread that pulls them and process them one at a time (too much resource to do multiple at once). The processing thread does this:
pull data from DB
foreach { proccess }
if count == 0 { thread.suspend() } (waken by thread.resume())
repeat
my wor...
Hello,
Could anyone tell me a way to prevent sql injection when building queries for SQLite where the WHERE clause has an "myval IN (string_1, ... , string_n)" condition ?
I though about dynamically building the command text with annotations and adding the parameters for those annotations from the string list. Is there an easier way ?
...
I am curious if there is a way to bind more then one db column to a resource. I need to bind more information to R.id.secondLine then just the difficulty column. But I'm unsure how to go about this? I'm currently subclassing SimpleCursorAdapter. Should I subclass another adapter? If so How to do I go about it?
Cursor activityHikes =...
Is it possible to do something like this:
begin;
insert into some_table (some_col, another_col) values ('a', 'b');
insert into some_table (some_col, another_col) values ('c', 'd');
...
commit;
...in HTML 5?
With each transaction being async and having it's own callback, seems to me that it would be difficult to write a ro...
I need the primary keys of 2 sqlite tables (say, id1 and id2) to be related such that no id1 can be equal to any id2 and viceversa. This is because I need to obtain from these 2 tables the same type of xml element, with unique attribute id.
Is there a way either in sql as understood by sqlite or in "classic" sql to express such constrain...
As a follow up to this previous question, I have a Core Data-based iPhone app that gets its underlying SQLite database file pre-loaded by a small utility, written in Cocoa, which I also wrote. Basically, I'm taking data from text files and building my data off-line, so the app is as fast as possible when it runs (i.e. no data parsing on ...
SQLite behaves differently when dealing with aggregation than many other RDBMS's. Consider the following table and values:
create table foo (a int, b int);
insert into foo (a, b) values (1, 10);
insert into foo (a, b) values (2, 11);
insert into foo (a, b) values (3, 12);
If I query it thus:
select a, group_concat(b) from foo;
Norm...
I have some code I use to transfer a table1 values to another table2, they are sitting in different database.
It's slow when I have 100.000 records. It takes forever to finish, 10+ minutes.
(Windows Mobile smartphone)
What can I do?
cmd.CommandText = "insert into " + TableName + " select * from sync2." + TableName+"";
cmd.Execute...
Hello,
I have a simple question: How to drop all indexes of a sqlite table?
I have multiple indexes created with random name.
Regards,
Pentium10
...
Hi,
I downloaded sqlitejdbc-v056.jar from http://www.zentus.com/sqlitejdbc/ to C:\test folder in windows XP 32-bit.
And downloaded sqlite3 database in C:\test folder.
And ran java -cp .:sqlitejdbc-v056.jar Test after compiling Test.java
but gave me this error message:
Exception in thread "main" java.lang.NoClassDefFoundError: Test
Pls he...