|
I am setting up a very small mySQL database that stores, first name, last name, email and phone number and am struggling to find the 'perfect' datatype for each field. I know there is no such thing as a perfect answer, but there must be some sort of common...
Started by Enrico on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
That personally I would never store a phone number in any kind of integer field, mainly because:
You don't name/last name fields should be at least 48 characters -- there are names from some countries countries like Canada that have letters....
|
|
I want to learn how to combine two db tables which have no fields in common. I've checked UNION but MSDN says :
The following are basic rules for combining the result sets of two queries by using UNION:
The number and the order of the columns must be ...
Started by Tarik on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
If the tables have no common fields then there is no way to combine the data in any meaningful view view:
SELECT T1.*, T2.* FROM T1 JOIN T2 ON T1.IDFIELD1 = T2.IDFIELD2
You mention no fields are "common an identifying field....
|
|
I'm programming in C here, for Windows and various Unix platforms. I have a set of structs that have common fields, but also fields that are different. For example:
typedef struct { char street[10]; char city[10]; char lat[10]; char long[10]; } ADDR_A...
Started by Morinar on
, 12 posts
by 12 people.
Answer Snippets (Read the full thread at stackoverflow):
Common fields will be accessible using any of the union member;
If there is common prefix you can....
Of the common fields are first, you should be able to just cast the pointer to an ADDR_A and treat also use an union.
|
Ask your Facebook Friends
|
Let's say you have two instances of the same bean type, and you'd like to display a summary of what has changed between the two instances - for example, you have a bean representing a user's settings in your application, and you'd like to be able to display...
Started by matt b on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Something like this:
Field[] oldFields = oldInstance.class.getDeclaredFields(); Field....
Basically, you have a loop over the fields, and you serialize the current field values at the same time them field by field.
|
|
How do I map "Joe Smith" to first name "Joe" last name "Smith"?
I already have code to split up the name, I'm not sure how to make that work with the Digester though.
<guestlist> <guest> <name>Joe Smith</name> </guest> <...
Started by ScArcher2 on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Loading from a file, you can also load from a stream XDocument loaded = XDocument.Load(@"C:\Guests.xml"); // Query the data and write out a subset of guests var guests= from c in loaded.Descendants("guest") select new { FirstName = SplitFunc_FirstName... .
|
|
In much of the code I have seen (on SO, thecodeproject.com and I tend to do this in my own code), I have seen public properties being created for every single private field that a class contains, even if they are the most basic type of get; set; like:...
Started by Callum Rogers on
, 13 posts
by 13 people.
Answer Snippets (Read the full thread at stackoverflow):
You may eventually need a more complex getter or setter, but if it's a field Age { get; set; }
instead of the old school....
Three reasons:
You cannot override fields in subclasses like you can properties.
Need, not what you need right now.
|
|
I want to make my fields as small as I can, but at the same time I don't want to have to go back and make them bigger later.
I was wondering if there is some sort of quick reference for field sizes and/or types for common database fields.
i.e., What is...
Started by Brian Ortiz on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
The per-row cost of defining a table with at least one varchar field is nominal (one hard to change choices), regarding....
For using at least one varchar field in a table, but that cost is the same whether you have one or several varchars.
|
|
Hi guys, im pretty new to jQuery, and i dont know how to do that, and if it can be done without editing manually the plugin.
Assume to have a simply form like that:
<form action="page.php" method="post"> Name: <input type="text" name="Your name...
Started by DaNieL on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
It is reasonably common.
Use jQuery or another library, which would hide these details from you .
|
|
What the size that you use for common database fields, like firstName, lastName, Email, password, etc? I see these common fields in a lot of databases of blogs, forums, e-commerces, etc. But I don't know if there is some reference or default for the size...
Started by Click Ok on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
Usually what I do for username fields like that is just choose an upper length such that anyone who valid input, but not so ....
Turns out that SMTP limits the length of fields to 256).
So there's your email field length.
Characters.
|
|
Hi folks,
I'm wanting to save some OpenId fields to a database table, such as
OpenId identifier Full Name Alias Email etc.. is there a place that summerizes the datatypes and lengths for all the common schema fields? I know there are custom ones (per ...
Started by Pure.Krome on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
I've never seen an email address longer than 40-50 chars .
Use common sense for the email.
|