Hi all. I've been grappling with the fraught area of escaping user (text) input for web pages. The ultimate goal is to have user input displayed and stored exactly as typed in, without breaking anything.
To that end I have been using the following test string :
'"$%^&()+=-£{}[]/n/<>\@~;|,.?#:!&``"'
It seems to work we...
I have three tables as follows (please forgive the loose syntax), with NO cascading relationships (I do not want this, as the database is primarily managed by NHibernate).
Invoice
(
entity_id int not null,
...
)
Ticket
(
entity_id int not null,
...
)
InvoiceTicket
(
InvoiceId --> Not-null foreign key to Invoice.ent...
Consider the need to create a resultset of dates. We've got a start and end dates, and we'd like to generate a list of dates in between.
DECLARE @Start datetime
,@End datetime
DECLARE @AllDates table
(@Date datetime)
SELECT @Start = 'Mar 1 2009', @End = 'Aug 1 2009'
--need to fill @AllDates. Trying to avoid loop her...
I have a requirement to create a Offline GuestBook on Windows Vista platform. The visitors will use the Lenovo Tablet PC to write their Feedback using it's Pen Input. It is also desirable for the Visitor to show his Business Card at the Tablet PC's built-in Cam to record an image too.
I am thinking about using Microsoft Access for this p...
In layman's terms, what is a unit of work in regards to database objects? I'm researching how to convert database tables into C# classes and I frequently come across this term, but everyone seems to describe it as if you should already know what it is.
...
I've tried this: http://be.php.net/manual/en/function.mysql-list-fields.php, but there's too much detail here.
What I'm looking for is a function that returns an array of strings. This array should only contain the names of all columns that a certain table has.
So for instance, if I have a table with these columns:
username | email | ...
We're writing an open source tool that is designed to work against multiple database products (really, it's designed to work with any database that has a JDBC driver available). However, because it does DDL (not DML), we need to test against different products.
While MySQL, PostgreSQL and other open source db's are easy for us to test o...
I have VS 2008 Pro (not VSTS DB edition) installed on my desktop and laptop, both running Windows 7, with SqlServer. When creating a Database Project on my desktop machine, the project structure includes a folders for. Database References which is crucial to the utility of a database project
However on my laptop, when creating a databa...
I would like a bit more clarification on the toxi method of storing tags in a database – mentioned elsewhere on SO.
The database schema is:
Table: Item
Columns: ItemID, Title, Content
Table: Tag
Columns: TagID, Title
Table: ItemTag
Columns: ItemID, TagID
This is probably a stupid question (but I don't know the answer)... Should eac...
I have a datagridview whose source is a datatable. There are orders and food names columns. I insert new values into the this datagridview and delete from the table. when I select one row and delete it, selected color moves to the top, and if I want to delete one more order for same food, I have to reclick it each time. How can I solve t...
Hi,
I'm building a social networking website. I have a table of Users. Each user can have a number of other users as friends, so I have a second table Friends:
user_id
friend_id
Based on this answer I'm trying to create the relationships. I have,
class User < ActiveRecord::Base
has_many :friends, :dependent => :destroy
has_many :...
Hey,
I'm working on a simple project to create tables and insert data into them, and finally execute some queries. Please note: I'm using MySQL command client.
My schema is easy to implement; it's no problem.
Emp(eid: integer, ename: string, age: integer, salary: real)
Works(eid: integer, did: integer, pct_time: integer)
...
i remember in my previous job, i needed to do data migration. in that case, i needed to migrate to a new system, i was to develop, so it has a different table schema. i think 1st, i should know:
in general, how is data migrated (with the same schema) to a different DB engine. eg. MySQL -> MSSQL. in my case, my destination DB was MySQL ...
Hi, I have a query which is designed to retireve the "name" field for all records in my "tiles" table but when I use print_r on the result all I get is the first record in the database. Below is the code that I have used.
$query = mysql_query("SELECT name FROM tiles");
$tiles = mysql_fetch_array($query);
I really cant see what I have ...
I have 2 tables MachineGroups and Machines.
Machine Groups has values
MachinegroupID
MachineGroupName
MAchineGroupDesc
And Machines has values
MachineGroupID (FK)
MachineID
MachineName Machinedesc
Now i want to delete am machinegroup but it gives me an error because there are already values in it.
So i want to de...
How can I write an sql statement that returns a list of how many students had lessons for each of the last 12 months?
so I would expect output something like:
+--------+----------------+
| Month | No of Students |
+--------+----------------+
| Oct 08 | 12 |
| ... | ... |
| ... | ... |
| Sep 09 |...
Could someone please lead me to a sample database for a financial accounting system?
...
So I have an iphone app that downloads data from a shared database. It switches between views and when it returns to the "data" view I'd like to download only the new data in the database. What is the best way to achieve this?
...
I've see an article about how to change the backend database of openldap in linux,one of step in that guide is compile openldap with the --enable-sql option. But I'am working on windows and I only got a binary-version of openldap, could I use postgres to change the original and how?
...
I need to add the current date time in a bigint field in a database... and then display from that only the date in format: october 1, 2009.
I am currently thinking of storing the value in string variable and then converting it to int...
String s = DateTime.Now.ToString();
i dont know what to do next..
please help
...