I want to keep customers' order history.
I am thinking of keeping names of product, number of product ordered, price of product, date of order, name, address etc
Table can be order_history and there will be field for id, date, cutomer_id,..
Then a question regarding names and number of products came in my mind.
How should I keep them...
Hello,
I'm just writing a SQLite powered android applications however I keep getting a NullPointerException when I call my DatabaseHelper class. The code which appears to be causing the error is below:
public Cursor GetAllRows() {
try {
return db.query(DATABASE_TABLE, new String[] {KEY_ROWID, KEY_PHRASE},
...
I'd like to add a feature to my android app that automatically backs up the sqlite database to the sd card.
What's the best way to go about this?
Any examples/tutorials available?
...
At first I was going to use doctrine ORM as the main one but it was an overkill, unneeded features and probably excessive calls. One of the main reasons was the "helper" that handled traverse trees (the hierarchy tree) easily but I'm starting to prefer building my own class.
This is what I'm looking for:
1) Can manage multiple databa...
I'm trying to decide what database system to use for storing information that is relatively static but needs to be computed in a number of different (runtime specified) ways. The basic contours of the data are votes in the US Congress:
A bill:
has many roll calls
has a name, and other short metadata
has text, and other potentially lon...
I found a similar question asked previously (School attendance database)
I have to deal with these additional conditions.
Total number of users recording attendance would be 100,000.
Each user will have swipe-in swipe-out entry.
A user may do multiple swipe-in swipe-out incase s/he is not sure data was captured.
A record of 1 year at...
I am facing ORA-01000: maximum open cursors exceeded although I am closing the resultsets in finally block. But I suspect there is some trouble with my legacy code, below is my pseudo-code
while (someCondition) {
rs1=executePreparedStatementNew(query1,param1,"");
//do something with rs1
rs1=executePreparedStatementNew(query2,param2,"")...
Hi
Within the next few weeks I plan to introduce SQL server to an office that is in dire need of a proper data server. Currently there is a heavy reliance on loose Excel and Access file (supplemented with frighteningly large amount of impenetrable VB code to do data manipulations) strewn all over the internal network.
We need SQL serve...
I wonder why the result of an SQL query in PHP PDO is called "statement". I'd expect "record set". My english is pretty bad as I'm not a native speaker.
So: I craeate a "query" to "ask the database to do/retrieve something". Sometimes I use "prepared statements" to ask that (blue confusion alert!). Then, PDO returns me an object of clas...
for example, I have a table 'post' and column 'views'. When people view the post each time, the 'views' will be added 1. Now my step is
@post = Post.find_by_id(params[:id])
@post.views += 1
@post.save
Is there any better way to add 'views'?
...
Hi all,
I have one problem regarding the data insertion in php.
In my site there is a message system.
so when my inbox loads it gives one javascript alert.
I have search a lot in my site and finally i found that some one have send me message with below text.
<script>
alert(5)
</script>
So how can i restrict the script code bein...
I need a DBMS, but do not know which to choose.
Basically, the application makes many INSERT / UPDATE, but also many SELECT. SELECT mostly very simple, one field only.
I am using MySQL + InnoDB at the moment, but as the database is growing, I need the best solution. The table can grow indefinitely, and the time +- 2GiB
EDIT:
Will run ...
Hi,
I have a problem in Grails 1.1.2 + MySQL.
My domain class Something contains field
Map<String, Map<Integer, Integer>> priceMap
When I run the app, Grails creates table 'something' and sub-table 'something_price_map'. 'something_price_map' contains
BIGINT(20) price_map
VARCHAR(255) price_map_idx
TINYBLOB price_map_elt
The pr...
Hi,
I am trying to create authentication for my php website. I am using the codeigniter framework. I will have to validate the session in all the pages of my website. So to avoid the code repetition, i am planning to do it in a helper function. Now that my user credentials are
in my database i would like to access the model to query th...
I'm a T-SQl and database newbie, and a little confused.
In the T-SQL book I'm reading it says that a USE statement is written to set the database context of the session. Does that mean that there can be more than one database in an instance of SQL-server and the USE statement tells SQL server which database the query will be on?
...
Simple question: does SQLite support FULL-TEXT searches?
If not, is there any way I can implement that feature?
...
i am using following code to insert data into mysql database
<?php
$refselect = $_POST['refselect'];
$refname = $_POST['refname'];
$refemail = $_POST['refemail'];
$refcnt = $_POST['refcnt'];
$refdes = $_POST['refdes'];
$referror = $cberror = "<h1>Data not Added</h1><br/><br/><h3>Please Follow The Instructions</h3>";
$ure...
Hi guys,
I'm trying to find out if this is possible, but so far I haven't found out any good solutions. What I would like to achieve is write a stored procedure that can clone a database but without the stored data. That means all tables, views, constraints, keys and indexes should be included but without any data. Can it be done?
...
I have searched on Google and read a couple of articles on how different people approach this problem, but I was wondering what the standard way of solving it is and also, which one will work best for my situation.
I have an AJAX page that creates a new question and I need to know how to retrieve the ID from the insert query within the ...
What is the best structure for an Orders table having OrderNumber, ItemNumber and CustID that allows for 1 or more item numbers for each order number?
...