|
-
Jul 27th, 2010, 06:35 AM
#1
Thread Starter
Lively Member
MySQL Tip of the day
Typing "2070" instead of "2010" will seriously screw up results that are sorted by date.
-
Jul 27th, 2010, 06:44 AM
#2
Re: MySQL Tip of the day
Typing ALTAR TABLE will not work - it's either an ALTAR or a TABLE, it can't be both.
-
Jul 27th, 2010, 06:50 AM
#3
Thread Starter
Lively Member
-
Jul 27th, 2010, 07:00 AM
#4
Re: MySQL Tip of the day
 Originally Posted by Spetnik
Typing "2070" instead of "2010" will seriously screw up results that are sorted by date.
Wishing your life away? Sounds like a cry for help.
I don't live here any more.
-
Jul 27th, 2010, 08:07 AM
#5
Re: MySQL Tip of the day
The command drop cascade is NOT your friend.
Was my first major cock up as a developer... well, that and not keeping a backup of my schema *D'oh!*
-
Jul 27th, 2010, 08:11 AM
#6
Re: MySQL Tip of the day
You could have delegated the schema backup to the DBA.
Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz'
save a blobFileStreamDataTable To Text Filemy blog
-
Jul 27th, 2010, 08:31 AM
#7
Re: MySQL Tip of the day
I think I coined another programming term.
"A cock-up": The error that results in the feeling that database and system administrators get. As in, the file deletion resulted in a major cock-up error for the windows admin.
Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz'
save a blobFileStreamDataTable To Text Filemy blog
-
Jul 27th, 2010, 09:39 AM
#8
Re: MySQL Tip of the day
Don't use VARCHAR(5) for storing booleans...
Delete it. They just clutter threads anyway.
-
Jul 27th, 2010, 10:05 AM
#9
Re: MySQL Tip of the day
'A cock-up' though is a general term when someone messes up, how is it also a programming term ?
Please Mark your Thread "Resolved",  if the query is solved & Rate those who have helped you
-
Jul 27th, 2010, 10:24 AM
#10
Re: MySQL Tip of the day
 Originally Posted by I_Love_My_Vans
The command drop cascade is NOT your friend.
Was my first major cock up as a developer... well, that and not keeping a backup of my schema *D'oh!*
It's an oversight, though. On one hand, you forget it's there and you do 'something' which cascades. OTOH it isn't there and you end up having to perform several transactions to remove related records out of a DB.
What's better? I like the option with more control...
-
Jul 27th, 2010, 10:31 AM
#11
Re: MySQL Tip of the day
Drop cascade and Delete cascade you be removed from the ANSI standard. Any professional DBA (even developer) would never allow them to be used in code on a database.
Sometimes the Programmer
Sometimes the DBA
Mazz1
-
Jul 27th, 2010, 10:42 AM
#12
Re: MySQL Tip of the day
 Originally Posted by NeedSomeAnswers
'A cock-up' though is a general term when someone messes up, how is it also a programming term ?
You're quite right, but look at the definition I coined in my other thread.
Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz'
save a blobFileStreamDataTable To Text Filemy blog
-
Jul 27th, 2010, 10:52 AM
#13
Re: MySQL Tip of the day
 Originally Posted by GaryMazzone
Drop cascade and Delete cascade you be removed from the ANSI standard. Any professional DBA (even developer) would never allow them to be used in code on a database.
Wut u say? not understnading.
-
Jul 27th, 2010, 12:40 PM
#14
Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz'
save a blobFileStreamDataTable To Text Filemy blog
-
Jul 27th, 2010, 12:42 PM
#15
Re: MySQL Tip of the day
NO... I really believe that Delete and Drop Cascades should never be allowed to be used in a database.
Sometimes the Programmer
Sometimes the DBA
Mazz1
-
Jul 28th, 2010, 03:06 AM
#16
Re: MySQL Tip of the day
I'd slam you for your incompetence, but it would probably garner the same satisfaction as winning a 'dunk the retard' contest.
-
Jul 28th, 2010, 03:30 AM
#17
Re: MySQL Tip of the day
Another tip:
Don't copy/paste a query a large number of times before testing it. I wrote "SELECT * FORM" instead of "FROM" by accident once and copied that like 50 times throughout a project. Then I used Replace All to replace FORM with FROM, not realizing half the table names contained the word 'FORM'.
-
Jul 28th, 2010, 05:14 AM
#18
Re: MySQL Tip of the day
 Originally Posted by GaryMazzone
NO... I really believe that Delete and Drop Cascades should never be allowed to be used in a database.
They're good in the sense that you're maintaining relationships and the integrity of those relationships. It's sort of like a patriarchal nihilistic/fatalist society - if a guy dies, then the wife, children and dog must kill each other. It's convenient in the sense that the police don't need to go around and do it, they just do it themselves.
-
Jul 28th, 2010, 06:24 AM
#19
Re: MySQL Tip of the day
They're good in the sense that you're maintaining relationships and the integrity of those relationships. It's sort of like a patriarchal nihilistic/fatalist society - if a guy dies, then the wife, children and dog must kill each other. It's convenient in the sense that the police don't need to go around and do it, they just do it themselves.

Please Mark your Thread "Resolved",  if the query is solved & Rate those who have helped you
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|