database

solr relational database error

i got 2 tables: threads: id, title posts: id, thread_id, body i want a document to contain the thread and all the posts that belong to it. why doesnt this work: <document> <entity name="threads" query="select id, title from threads"> <field column="title" name="threads.title"/> ...

MySQL: Who are today "on" between 2 diferent dates

I have a Mysql problem. (I use PHP with it). For example I have this kind of database: Name | Started and | will end Jason | 2009-12-17 | 2009-12-24 Ericke | 2009-12-12 | 2009-12-30 Maria | 2010-01-02 | 2010-01-10 With mysql (or php) question I would like to get the names of people, which are "on" right now (2009-12-19). The answer...

Using Google App Engine's Cron service to extract data from a URL

Hi Guys! I need to scrape a simple webpage which has the following text: Value=29 Time=128769 The values change frequently. I want to extract the Value (29 in this case) and store it in a database. I want to scrape this page every 6 hours. I am not interested in displaying the value anywhere, I just am interested in the cron. Hope I ...

How to make up for changed Sql Server database password

There is a website made using .net, the maker has gone and we can't find him. For a long time we don't know the password of the sql server database, today I tried to reset the password and then found the website can't connect to the database! However I've got the .cs and .aspx and .dll files, I checked the code and find it getting connec...

Is it possible to use the Google App Engine as a backend database for Android applications?

I would like to write a client application for Android that uses the Google App Engine as a database backend. My Android client would connect to the App Engine to save information, then it would connect later for reports. Is it possible to use the App Engine as a backend like this? ...

How are mobile service provider databases so fast?

i was wondering on how these databases which have over millions of records and millions of lookups per second soo fast. how are they optimised? are there any special servers hosting these databases? how are they scaled? ...

access and sql server realtime synchronization

i have a security application that stores its data in a access database.now i'm required to make a realtime synchronization (replication) between that access database and a new database in sql server 2005. these two database are the same. any suggestion?! ...

Lock whole database?

I have really odd user requirement. I have tried to explain to them there are much better ways of supporting their business process and they don't want to hear it. I am tempted to walk away but I first want to see if maybe there is another. Is there anyway that I can lock a whole database as opposed to rowlock or tablock. I know I can p...

delphi and mysql DB help

hello all I want to create an application for my friends ,Its like a slam book I want like this in nameditbox when i entered name it has to fetch data from database and have to display in respected fields example : nick name editboz :nick number:1111 2.moreover i want to add to database new entry from my application b...

how to delete records from ms access in vb.net

Ive seen tutorials on the net on how to do it, but the tutorial is not applicable on the program that I wish to do. The tutorial tells you to add 4 navigation buttons so that you can navigate the database(first, last, back, and forward). Then an update and delete button. But if this is what I will do, it would take 10 years to navigate ...

Database for US Universities and Colleges

Not sure if this is the proper place to post this question, but I've seen questions regarding ISBN databases, so I thought it would be appropriate. In my website, I intend allow my users to choose between all the US college/universities (community or 4 year institutes). I would then store their selection in a database. At first I thoug...

concurrency in hibernate

I have a servlet that does some work for user and then decrement user's credit. When I watch user's credit in the database in real time, if there are many concurrent requests from the same user, the credit has been deducted incorrectly due to concurrency control. T Assume I have one server and database management used is hibernate. I am...

VS 2008 Team Database project

I have one database of sql2008. 1- Some table are use for client in sql compact CE format. 2- Whole DB on server I want to use team data base project solution to manage, compare and modify the schema. Can i made any distinguish to project to compare only some tables and generate scripts. Please let me know if it make some sense. ...

How do I store a picture in MySQL?

I want to store an image in a MySQL database. I have created a table with a BLOB datatype, but now how do I store the image in this table? ...

Backup and Restore Filtered Data from SQL Server database using C#

Hello Friends, I wish to implement backup and restore feature for my application. Here I want to backup filtered data(not the whole database). Like Select * from Sales where CompanyId=1 For all tables in database and write these data to a file.bak file, later which I can be used for restore purpose. My Question here is Is...

Fixed-size character encoding

Hello world ! I am developing, in VB.Net, an application that reads from text files using a FileStream Object. I do not use a StreamReader, since the buffering it does makes it impossible to use Seek. Those text files form a database, with both index and data files. In index files, all fields are fixed-length, which is not the case in ...

Django models generic modelling

Say, there is a Page that has many blocks associated with it. And each block needs custom rendering, saving and data. Simplest it is, from the code point of view, to define different classes (hence, models) for each of these models. Simplified as follows: class Page(models.Model): name = models.CharField(max_length=64) class Block...

I have to write two sql statements in order to update a record, is there a better way to do it?

I want to update a table: $result=mysql_query("select balance from tablename where userid='$userid")or die(mysql_error()); $row=mysql_fetch_assoc($result); $accountbalance=$row['balance']; if($accountbalance>$cost) { $result=mysql_query("update tablename set balance-'$cost' where userid='$userid")or die(mysql_error()); } else { ... } ...

Can an attribute designate one table over another?

I'm creating a sports statistics database. With it, I'd like to catalog game/match statistics for many types of sports. For example, this database would be able to tell you how many touchdowns the Carolina Panthers scored in the 09-10 season (football), or how many free throws were made by the Miami Heat in their last game (basketball). ...

Why does mysql_affected_rows return 0 even if one record should be updated

mysql_query("update users set balance=balance+'$pwbalance'-'$totalprice' where memberid='$memberid' and (balance+'$pwbalance'-'$totalprice')>=0")or die(mysql_error()); $count=mysql_affected_rows(); When I echo $pwbalance, it is 40.00; when I echo $totalprice, it is 40; So there should be one record to be updated. However, when I echo $...