Nonsense... by that logic, you will accept as "truth" something told you by a friend if a friend of a friend of a man you met in the pub ?
Credible ? I think not. Like I said, put your name to your spiel, and validate it, if only to those of us who don't trust people who throw stones from behind an impenetrable barrier.
Yes, yes, I get your point, and we can bandy semantics all day.
In the real world however, people tend to look at columns in a database in the same way as they see a variable in a program. Depending on the language, a declared but undefined variable can be "NULL", or "undefined", or more commonly, defaults to what is considered an "empty" or default value suitable for that column. i.e. strings take on the value "", integers take the value 0, etc etc.
You seem to want to encourage a mindset that separates people who work with DBs and programmers who more often than not, work with these "empty" values in their code, and expect the same behaviour from the DB. Sort of counter intuitive to a lot of us, especially those of us that have to perform BOTH programming AND DBA tasks.
When I write NOT NULL in a column, it doesn't necessarily mean I want to enforce that I MUST supply a value during any INSERT (and indeed then have to check that my INSERT actually worked and check for possible returned errors, coding exceptions etc). Therefore I always supply a DEFAULT value, that the DB can safely insert in that column, IF I haven't specified anything different during the INSERT.
THis also means that I also do not need to code checks everywhere I will subsequently USE that column's data to see if it is still NULL, or if there is something in it. I am guaranteed that even if I haven't explicitly set anything, the column will have taken the default value instead, and CANNOT contain any NULLs.
Sorry if I missed something critical, but it seems like you are trying to put all the load onto the programmer just so you can have a "cleaner" table definition ? Seems a bit counter-productive to me. Especially when you read that table definition, which says somethig like "nulls are not allowed, and the default value is null" ???
Congratulations, you win today's award for the "Lowest Possible Depth Sunk To Slur Microsoft".
The article, in case you hadn't noticed, was about "Music for Horses", NOT "Microsoft". I realise they both start with the letter "M", and this obviously stimulated one of your three neurons enough to generate your post. Really, is there no limit to these trolls ?
Better not pick up any more hitch hikers then, because my car stereo could be deemed a public performance.
This used to be only about bars, clubs, oil-rigs (for some god only knows reason) etc where it was considered public perfromance... now they've started restricting HORSES and anyone who "just happens to be within earshot" ?
Where the fuck did we go wrong ? I've been on this rock for 41 years, and I can't put my finger on exactly when we lost all semblance of common sense and discretion ?
A sign language version would be an obvious "format shifting" violation, and then she'd have to pay even more money to the man, or risk some nonsensical IP law being applicable.
If you are so convinced of your position, why are you so ashamed to put your name to it ?
Or could it be you are just an attention seeking troll hiding in your bedroom behind a mask of anonymity, meaninglessly copy-pasting bullshit from elsewhere ?
The truth carries no weight when posted by Anonymous Cowards.
Just wait until the power goes down, and when it comes back up, you go to open the *.MDB, you get the deadly "This is not a valid database - do you wish to convert it to Offcie 97 format ?".
[rant]*one of my biggest pet peeves of MySQL... when I say CREATE TABLE(varchar(255) blah NOT NULL) please do not add your own 'DEFAULT ""' to the end--it is considered by some to be rather rude! I can spot MySQL schema's a mile away by this single trait. Anything NOT NULL almost always has a bullshit default value. Got a NOT NULL int--it will have a DEFAULT 0! Got a NOT NULL date, "DEFAULT 0000-00-00", which isn't even a valid date! How is that for taking your data seriously?[/rant]
So you want the column to be NOT NULL, and yet you can't be bothered to tell the db your desired default value for that column. What EXACTLY do you expect the database to do ?
Now a "proper" db might just moan at table creation time that you're trying to do something silly, whereas MySQL assumes you are silly and inserts it's own suggested default.
Horses for courses I would have said. Just for interest, as I'v enever tried Postgre, what does IT do ? Allow you to continue, then moan when you try and do an INSERT, or does it really stop you at creation time with a warning / error. I mean this seriously, I'm interested to know how much better it is than MySQL, but really don't want to install it just for a simple question like this that really would separate "professional" DBs from "amateur" DBs ?
SELECT count(uid) FROM users WHERE username=BINARY('coryking');
It will still use the same index (assuming you have one) on the username column as
SELECT count(uid) FROM users WHERE username='coryking';
The point is, while case sensitivity might be the more-correct purist programmer's / DBA's outlook on things, the pointy headed bosses' outlook is that 'coryking' and 'CoRyKiNg' ARE THE SAME, and you suck as a programmer if your system can't even deal with this simple bit of fuzzy matching.
I'm happy with MySQL the way it behaves now, and if I really want to be pedantic, I can use the BINARY('') matching at no extra cost in performance, despite the FUD coming from the Postgre camp.
If the div named results exists, then fade in a "success" message.
And if it doesn't exist, let the poor dumb user sit there for 30 years, wondering if the AJAX query (which runs in the background and gives NO visible indication it's doing anything), has submitted, completed, failed or just "ceased-to-be and become an EX-query" ?
This is why the web is such a mess, script kiddys like this who don't even think about usability.
People lived about 2.72 years longer over that time span and at least 15 percent of that increased life expectancy was from a decrease in air pollution
So basically, the study found that you live on average 148 more days due to the lessened effect of air pollution. A whole four extra months living in a vegetative state in an old peoples sanctuary. Kind of gives us all hope for the future, doesn't it ?
And the late 20s / early 30s still-living-in-moms-basement, M$ is bad, OSS is good, information should be free except when it's under a GNU licence crowd you get in here are a "meaningful metric" ?
Yes, the most insignificant 0.007% of the population who have nothing better to do (myself included) than to post variations of "we hate microsoft" on a glorified BBS, and who have nothing but the support of our fellow peers modding us up or down to make us feel like we belong to an elite part of tech society.
I might have been tempted to say "you must be new here", except for the fact you didn't have the guts to post as anything but Anonymous Coward.
That would depend on the breasts in question... some of the flabby, dangly, purple-veined monstrosities you tend to see are perhaps better hidden from fragile eyes.
Most of us gave up on the "why can't we all get along and sing happy songs in a pink fluffy bunny kind of world" when we became teenagers. What's your excuse ?
The Pirate Bay is hosted in Sweden, that didn't stop the whole world blaming them for copyright infringement violation of DMCA piracy arrrrrrrrr... etc etc
Offtopic I know, so save your mod points for something useful;-)
What is this obsession with namespaces ? And why don't you think perl can't do it ?
require "SomeModule.pl"
&SomeModule::SomeSubroutine;
$SomeModule::SomeString = 123;
%SomeModule::SomeHash{Key} = Value;
@SomeModule::SomeString[2] = 456;
And guess what ... within the module itself, you can refer to those variables and subroutines WITHOUT the namespace prefix !!!
Are are you one of those coders who puts everything into one humungus source file that is 27MB in size ?
Nonsense ... by that logic, you will accept as "truth" something told you by a friend if a friend of a friend of a man you met in the pub ?
Credible ? I think not. Like I said, put your name to your spiel, and validate it, if only to those of us who don't trust people who throw stones from behind an impenetrable barrier.
Yes, yes, I get your point, and we can bandy semantics all day.
In the real world however, people tend to look at columns in a database in the same way as they see a variable in a program. Depending on the language, a declared but undefined variable can be "NULL", or "undefined", or more commonly, defaults to what is considered an "empty" or default value suitable for that column. i.e. strings take on the value "", integers take the value 0, etc etc.
You seem to want to encourage a mindset that separates people who work with DBs and programmers who more often than not, work with these "empty" values in their code, and expect the same behaviour from the DB. Sort of counter intuitive to a lot of us, especially those of us that have to perform BOTH programming AND DBA tasks.
When I write NOT NULL in a column, it doesn't necessarily mean I want to enforce that I MUST supply a value during any INSERT (and indeed then have to check that my INSERT actually worked and check for possible returned errors, coding exceptions etc). Therefore I always supply a DEFAULT value, that the DB can safely insert in that column, IF I haven't specified anything different during the INSERT.
THis also means that I also do not need to code checks everywhere I will subsequently USE that column's data to see if it is still NULL, or if there is something in it. I am guaranteed that even if I haven't explicitly set anything, the column will have taken the default value instead, and CANNOT contain any NULLs.
Sorry if I missed something critical, but it seems like you are trying to put all the load onto the programmer just so you can have a "cleaner" table definition ? Seems a bit counter-productive to me. Especially when you read that table definition, which says somethig like "nulls are not allowed, and the default value is null" ???
You are forgiven my son ... hell, you have to be able to copycat entire articles before you can become an author here !
Congratulations, you win today's award for the "Lowest Possible Depth Sunk To Slur Microsoft".
The article, in case you hadn't noticed, was about "Music for Horses", NOT "Microsoft". I realise they both start with the letter "M", and this obviously stimulated one of your three neurons enough to generate your post. Really, is there no limit to these trolls ?
Better not pick up any more hitch hikers then, because my car stereo could be deemed a public performance.
This used to be only about bars, clubs, oil-rigs (for some god only knows reason) etc where it was considered public perfromance ... now they've started restricting HORSES and anyone who "just happens to be within earshot" ?
Where the fuck did we go wrong ? I've been on this rock for 41 years, and I can't put my finger on exactly when we lost all semblance of common sense and discretion ?
A sign language version would be an obvious "format shifting" violation, and then she'd have to pay even more money to the man, or risk some nonsensical IP law being applicable.
If you are so convinced of your position, why are you so ashamed to put your name to it ?
Or could it be you are just an attention seeking troll hiding in your bedroom behind a mask of anonymity, meaninglessly copy-pasting bullshit from elsewhere ?
The truth carries no weight when posted by Anonymous Cowards.
Because sometimes your web application needs to do something more than ?
1. SELECT * FROM TABLE
2. Display * in a bloody awful HTML template
Anything more than and PHP will only yield tears, depression and suicidal tendencies.
Besides, stealing Perl syntax and merely reversing the order of the parameters does not a language make ... now get off my lawn.
Although in kdawson's case, it's usually the SAME story again three days later.
Just wait until the power goes down, and when it comes back up, you go to open the *.MDB, you get the deadly "This is not a valid database - do you wish to convert it to Offcie 97 format ?".
Ciao ciao mission critical data.
Base ? the only database so bad, that they don't even like to include it in their openoffice installer ?
Unfortunately, it has chosen a rather obvious piece of cover ..... boom !!!
[rant]*one of my biggest pet peeves of MySQL... when I say CREATE TABLE(varchar(255) blah NOT NULL) please do not add your own 'DEFAULT ""' to the end--it is considered by some to be rather rude! I can spot MySQL schema's a mile away by this single trait. Anything NOT NULL almost always has a bullshit default value. Got a NOT NULL int--it will have a DEFAULT 0! Got a NOT NULL date, "DEFAULT 0000-00-00", which isn't even a valid date! How is that for taking your data seriously?[/rant]
So you want the column to be NOT NULL, and yet you can't be bothered to tell the db your desired default value for that column. What EXACTLY do you expect the database to do ?
Now a "proper" db might just moan at table creation time that you're trying to do something silly, whereas MySQL assumes you are silly and inserts it's own suggested default.
Horses for courses I would have said. Just for interest, as I'v enever tried Postgre, what does IT do ? Allow you to continue, then moan when you try and do an INSERT, or does it really stop you at creation time with a warning / error. I mean this seriously, I'm interested to know how much better it is than MySQL, but really don't want to install it just for a simple question like this that really would separate "professional" DBs from "amateur" DBs ?
What is wrong with ?
SELECT count(uid) FROM users WHERE username=BINARY('coryking');
It will still use the same index (assuming you have one) on the username column as
SELECT count(uid) FROM users WHERE username='coryking';
The point is, while case sensitivity might be the more-correct purist programmer's / DBA's outlook on things, the pointy headed bosses' outlook is that 'coryking' and 'CoRyKiNg' ARE THE SAME, and you suck as a programmer if your system can't even deal with this simple bit of fuzzy matching.
I'm happy with MySQL the way it behaves now, and if I really want to be pedantic, I can use the BINARY('') matching at no extra cost in performance, despite the FUD coming from the Postgre camp.
You must have a lot of wobbly bookcases eh ?
So let me get this right ...
If the div named results exists, then fade in a "success" message.
And if it doesn't exist, let the poor dumb user sit there for 30 years, wondering if the AJAX query (which runs in the background and gives NO visible indication it's doing anything), has submitted, completed, failed or just "ceased-to-be and become an EX-query" ?
This is why the web is such a mess, script kiddys like this who don't even think about usability.
SOAP is even more of a bloated piece of crap than XML.
There, fixed that for you.
People lived about 2.72 years longer over that time span and at least 15 percent of that increased life expectancy was from a decrease in air pollution
So basically, the study found that you live on average 148 more days due to the lessened effect of air pollution. A whole four extra months living in a vegetative state in an old peoples sanctuary. Kind of gives us all hope for the future, doesn't it ?
And the late 20s / early 30s still-living-in-moms-basement, M$ is bad, OSS is good, information should be free except when it's under a GNU licence crowd you get in here are a "meaningful metric" ?
Yes, the most insignificant 0.007% of the population who have nothing better to do (myself included) than to post variations of "we hate microsoft" on a glorified BBS, and who have nothing but the support of our fellow peers modding us up or down to make us feel like we belong to an elite part of tech society.
I might have been tempted to say "you must be new here", except for the fact you didn't have the guts to post as anything but Anonymous Coward.
Sorry, I'm in a funny mood today ...
and Travel agents for that matter
Computer says no ... *cough* ...
(For those of you in the dark, look up "Little Britain" on youtube).
I don't think I've ever once heard a bartender suggest "you should drive home drunk".
In fact, a lot of them are far more likely to say "looks like you've had too much, you'd better not drive tonight", and even call you a taxi.
A bartender wants to sell beer ... he doesn't want you to break the law. A punter who is in jail or rehab is unlikely to buy more beer.
That would depend on the breasts in question ... some of the flabby, dangly, purple-veined monstrosities you tend to see are perhaps better hidden from fragile eyes.
I beg to differ, now fuck off !
See how much *fun* that is ?
Most of us gave up on the "why can't we all get along and sing happy songs in a pink fluffy bunny kind of world" when we became teenagers. What's your excuse ?
The Pirate Bay is hosted in Sweden, that didn't stop the whole world blaming them for copyright infringement violation of DMCA piracy arrrrrrrrr ... etc etc
Offtopic I know, so save your mod points for something useful ;-)