Hi, I'm trying to use sqlite with php.
I used some tutorial:
$db = sqlite_open("db.sqlite");
sqlite_query($db , "CREATE TABLE foo (id INTEGER PRIMARY KEY, name CHAR(255))");
sqlite_query($db, "INSERT INTO foo (name) VALUES ('Ilia')");
sqlite_query($db, "INSERT INTO foo (name) VALUES ('Ilia2')");
sqlite_query($db, "INSERT INTO foo (na...
I am trying to set up active records on top of a sqlite3 database with native ruby 1.8. This should work easily enough, I have seen plenty of examples out there that explain how. I am using some example code I have found, its pretty basic and starts with the following lines:
require 'rubygems'
require 'active_record'
#require 'sqlite3-r...
Hello.
I have developed a win mobile (v5.0) application and I use ONLY 1 database SQLITE with these references:
System.Data.SQLite.dll (assembly version & product version : 1.0.65.0);
SQLite.Interop.065.DLL (product version : 1.0 and is a c++ lib for first dll ).
After 5 weeks of using of this application, I get today a weird exce...
SQLite3 gives you a default primary key called rowid for each table if you don't specify a primary key. However, it looks like there are some disadvantages to relying on this:
The VACUUM command may change the ROWIDs of entries in tables that do not have an explicit INTEGER PRIMARY KEY.
http://www.sqlite.org/lang_vacuum.html
I wa...
I'm generating a pretty big sqlite-file on a server (about30'000 entries, it's about 3mb big) and would like to use that data in my iPhone application.
The sqlite-file on the server is generated every hour; some of the data is changing nearly everytime, some of the data changes only rarely.
Is there a way only to send the changed data ...
I'm thinking about using/implementing some kind of an embedded key-value (or document) store for my Windows desktop application. I want to be able to store various types of data (GPS tracks would be one example) and of course be able to query this data. The amount of data would be such that it couldn't all be loaded into memory at the sa...
Here is my problem, I have a SQLite table with locations and latitudes / longitudes. Basically I need to:
SELECT location, HAVERSINE(lat, lon) AS distance FROM location ORDER BY distance ASC;
HAVERSINE() is a PHP function that should return the Great-Circle Distance (in miles or km) given a pair of latitude and longitude values. One o...
Hey guys, I'm pretty new to sqlite 3 and just now I had to add a column to an existing table I had. I went about doing that by doing: ALTER TABLE thetable ADD COLUMN category;.
Of course, I forgot to specify that column's type. The first thing I was thinking about doing was dropping that column and then re-adding it. However, it seems t...
I can't believe this is the first time this has come up. I have a script that looks like this:
drop table if exists Recipients
drop table if exists Messages
create table Recipients (
Id INTEGER not null,
Name TEXT,
Email TEXT,
primary key (Id)
)
create table Messages (
Id INTEGER not null,
Subject TEXT,
Conten...
Hi all,
I have a question related to some guidances to solve a problem. I have with me an xml file, I have to populate it into a database system (whatever, it might be sqlite, mysql) using scripting language: Python.
Does anyone have any idea on how to proceed?
Which technologies I need to read further?
Which environments I have to i...
Does anyone know of an Objective-C library that will easily allow developers to parse a SQL file? I am building an iPhone application that contains a SQLite database and I am attempting to come with a system to upgrade a user's writable database. After reading a lot of the questions and answers on this site it appears that the best way t...
I have a list that has 3 rows each representing a table row:
>>> print list
[laks,444,M]
[kam,445,M]
[kam,445,M]
How to insert this list into a table?
My table structure is:
tablename(name varchar[100], age int, sex char[1])
Or should I use something other than list?
Here is the actual code part:
for record in self.server:
...
Using Linux, I want to compare two SQLite databases that have the same schema.
There will be just a few differences.
Is there a tool that would output these differences?
Preferably output them to the command line, so that I can grep/sed them.
SQLite uses SQL, so a general SQL tool might also do.
...
Hi all,
I have some question regarding database performance in general. I'm using Sqlite but I assume that the performance remarks are applicable to all relational databases?
I have a database that contains a table that stores data of about 200 variables. I write about 50 variables per second to the table. A writen variable contains th...
Hello:
I use System.Data.SQLite and C# for accesing SQLite databases/tables. For lazy and fast development reasons, I created my own library of classes to encapsulate some of System.Data.SQLite methods in one method, and to create many common database routines (methods) that let me reduce my work when accessing to data.
If I would inhe...
Hello.
Im trying to insert object into SQLite InMembory database as follow:
private void button1_Click(object sender, EventArgs e)
{
var sessionFactory = CreateSessionFactory();
using (var session = sessionFactory.OpenSession())
{
Person p = new Person { Age = 25, FirstName = "Dariusz", LastName =...
On a Python driven web app using a sqlite datastore I had this error:
Could not decode to UTF-8 column
'name' with text '300µL-10-10'
Reading here it looks like I need to switch my text-factory to str and get bytestrings but when I do this my html output looks like this:
300�L-10-10
I do have my content-type set as:
<meta ...
I'm trying to run the following query in SQLite 3:
SELECT *,
DISTANCE(latitude, longitude, ?, ?) AS "distance"
FROM "country"
WHERE "id" NOT LIKE ?
HAVING "distance" <= ?
ORDER BY "distance" ASC;
But I get the following error:
SQLSTATE[HY000]: General error: 1 a
GROUP BY clause is required before
HAVING
I don't understand ...
I want to think of a way to display and query comments.
Each comment can have children and siblings. I would like to display 40 comments in a page. However, I would like to show all the children. The problem here is if a child has more then 40 comments beneath it this will not work out. Also, I have no idea how I might get the comments....
Hi there
I have a Sqlite DB with a query that is placed in the Appdelegate to return an array of objects.
From other views I can instantiate the appDelegate and retrieve objects that are set there but I cannot pass a value to one of its methods such as below.
If anyone has any advice as to how to do that I'd be grateful.Also is it bet...