I have multiple tables
post
id Name
1 post-name1
2 post-name2
user
id username
1 user1
2 user2
post_user
post_id user_id
1 1
2 1
post_comments
post_id comment_id
1 1
1 2
1 3
I am using a query like this:
SELECT post.id, post....
Hello,
I'm accessing a remote database using a local-to-remote port forwarding from my windows box. It works like a charm using putty for port forwarding but it fails when I try to forward using Ruby/Net::SSH. Here is my code snippet:
require 'rubygems'
require 'net/ssh'
Net::SSH.start(remote_host, user_name, :password => password) do...
Hi All,
I'm new to mysql. My Requirement is I have a database "sample" and there are 20 tables in it with some sample data. I want to remove all the data from all tables of that database without deleting tables or recreating them
So please help me with a solutions.
Regards
Chandu.
...
Hi
In my android app I am getting "database disk image is malformed"
What are the reasons for getting this error?
not closed db? multiple threads accessing the db? or android just got corrupted?
Thanks
========================================================================================
android.database.sqlite.SQLiteDatabaseCorr...
Lets say we have a simple DTO with properties Id, Name. If this DTO comes from database through some data layer, Id should be of type int. If this DTO comes from Active Directory, through some data layer, Id should be of type Guid.
What would be the best way to implement this?
Thanks in advance!
...
Hello all,
I wish to search twitter for a word (let's say #google), and then be able to generate a tag cloud of the words used in twitts, but according to dates (for example, having a moving window of an hour, that moves by 10 minutes each time, and shows me how different words gotten more often used throughout the day).
I would apprec...
i have users and i need them to specify a gender (male, female) and year of birth (1930, 1931...1999, 2000).
i wonder where i should store these values:
in the database?
in php file?
if i store them in the database i have to manually create all entries first. but a good thing is that the user table will have constraints so the gende...
How do I prevent a duplicate row from being created in a table with two columns, neither of which are unique? And can this be done using MySQL only, or does it require checks with my PHP script?
Here is the CREATE query for the table in question (two other tables exist, users and roles):
CREATE TABLE users_roles (
user_id INT(100) NOT ...
Hi guys,
I want to store all my sessions in a DB and have read up on this and implemented the following class:
<?php
/**
* This class handles users sessions and stores the session in the DB rather than in a file. This way stops any
* shared host security problems that could potentially happen.
*/
class sessionHandler {
/**
...
I'm storing some very basic information "data sources" coming into my application. These data sources can be in the form of a document (e.g. PDF, etc.), audio (e.g. MP3, etc.) or video (e.g. AVI, etc.). Say, for example, I am only interested in the filename of the data source. Thus, I have the following table:
DataSource
Id (PK)
Filenam...
I want to do something like:
lastName SIMILARTO(lastName, 'Schwarseneger', 2)
where lastName is the field in the database, 'Schwarseneger' is the value that lastName field is being compared to and 2 is the maximum number of characters (edit distance) that can differ between the lastName field, and the entered value.
I can implement the...
I have a question, just looking for suggestions here.
So, my application is 'modernizing' a desktop application by converting it to the web, with an ICEFaces UI and server side written in Java. However, they are keeping around the same Oracle database, which at current count has about 700-900 tables and probably a billion total records...
I have to track the stock of individual parts and kits (assemblies) and can't find a satisfactory way of doing this.
Sample bogus and hyper simplified database:
Table prod:
prodID 1
prodName Flux capacitor
prodCost 900
prodPrice 1350 (900*1.5)
prodStock 3
-
prodID 2
prodName Mr Fusion
prodCost 300
prodPrice 600 (300*2)
prodStock 2
-
...
My company have develop a web application using php + mysql. The system can display a product's original price and discount price to the user. If you haven't logined, you get the original price, if you loginned , you get the discount price. It is pretty easy to understand.
But my company want more features in the system, it want to disp...
Modern database provide caching support. Most of the ORM frameworks cache retrieved data too. Why this duplication is necessary?
...
I am evaluating two object databases, db4o (http://www.db4o.com) and Eloquera Database (http://eloquera.com) for a coming project. I have to choose one. My basic requirement is scalability, multi user support and easy type evolution for RAD.
Please share your real world experience.
If you have both, can you compare these two? Which do...
I have a classifieds website where users may sell/buy just about anything...
My issue which costs the company alot of money, time etc is that ALL classifieds must be reviewed by a physical person (employee) before beeing posted on the website.
So when you create a new classified enty, you get the message like "Your ad will be reviewed ...
I Want get All Code of stored procedure from database and convert that procedure in textfile and save that textfile in particular path in c#.net window application.
...
Is there an in process database, like SQLite or Sql Server Compact Edition, that supports stored procedures?
...
I have an Employee table, it's a self-referencing table, with managerId refers to primary key empID. I want to find 2 level records by a given empId.
For example: if given empId=5,
if empId=5 has children records, display them, as well as the children in children records.
The database is SQL Server 2005.
update: I wanna a full project...