Showing entries 42293 to 42302 of 44885
« 10 Newer Entries | 10 Older Entries »
MySQL triggers and Master/Detail tables

Have you ever wondered how to update the status of an order to "Closed" when the whole ordered quantity has been received?
If you are on a database that supports triggers like me (I'm on MySQL 5.0.16 right now) you can have something like:

Table structure:

Orders table



  1. DROP TABLE IF EXISTS `test`.`orders`;
  2. CREATE TABLE `test`.`orders` (
  3. `order_id` int( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT,
  4. `order_date` datetime DEFAULT NULL,
  5. `order_status` CHAR ( 1 ) NOT NULL DEFAULT '',
  6. PRIMARY KEY ( `order_id` )
  7. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;


Order lines table



  1. DROP TABLE IF EXISTS `test`.`order_lines`;
  2. CREATE TABLE `test`.`order_lines` (
  3. `order_id` int( 10 ) UNSIGNED NOT NULL DEFAULT '0',
[Read more]
Server SQL Modes Quickref chart available at the MySQLForge Wiki
Missing lots of conferences

Whow, seems like next couple of weeks will be extermely busy when looking at conferences, In the next couple of weeks there is the MySQL User Conference, Fisl is about to start and I`m going to miss all of them , them being at the other side of the ocean. I`m making my travel arrangements for LinuxTag where I`ll be helping out in the Grid and Virtualisiation track however. Not sure about my plans for the rest of the year.

Not going to all these conferences means that I`ll have lots more time to get some stuff done, such as upgrading some of my test platforms to a more recent CentOS version so that I don't have to build the MySQL Cluster binaries myselve but just use the ones provides by MySQL :)

As the weather plans on staying bad I`m also planning on more …

[Read more]
Springtime -- Time for Conferences

Here‘s a snapshot of my view out the office window…Yes, it‘s starting to look like springtime here in Chicago.

That also means it‘s that time of year where I start travelling for conferences. This year is shaping up to be light so far, but of course I will be at the MySQL Users' Conference next week in Santa Clara, CA.

Besides giving a tutorial, and two talks, I'm also looking forward to being part of the Java and MySQL community, hanging out at Gavin's talk about Hibernate and Seam, and participating in the …

[Read more]
Springtime -- Time for Conferences

Here's a snapshot of my view out the office window...Yes, it's starting to look like springtime here in Chicago.

That also means it's that time of year where I start travelling for conferences. This year is shaping up to be light so far, but of course I will be at the MySQL Users' Conference next week in Santa Clara, CA.

Besides giving a tutorial, and two talks, I'm also looking forward to being part of the Java and MySQL community, hanging out at Gavin's talk about Hibernate and Seam, and participating in the …

[Read more]
Springtime -- Time for Conferences

Here‘s a snapshot of my view out the office window…Yes, it‘s starting to look like springtime here in Chicago.

That also means it‘s that time of year where I start travelling for conferences. This year is shaping up to be light so far, but of course I will be at the MySQL Users' Conference next week in Santa Clara, CA.

Besides giving a tutorial, and two talks, I'm also looking forward to being part of the Java and MySQL community, hanging out at Gavin's talk about Hibernate and Seam, and participating in the …

[Read more]
Free Books at the MySQL UC

Just in case the HypnoToad did not convince you to attend my sessions at next weeks’s conference, I’ll up the ante.

Thanks to Apress and O’Reilly I’ll be giving away several MySQL related books at each session.

There, now you have to come. And of course watch this space for session notes.

Someone is always damaged

This morning I read some reports on the reaction to Sun's recent discussion on open source DRM.  The reaction from the Stallmanites was not surprisingly negative.  From what I gather, no DRM is the only solution that would be acceptable however this has left me somewhat confused.  Perhaps someone could leave me a comment and help me understand how this is supposed to work.

Here's what I've got so far.  Stallman cites four basic freedoms.  The freedoms to run the program you wish, to change said program, to distribute said program, and to distribute said changes.  These freedoms fit neatly into a software world but are being applied to the digial media and DRM argument.

Apparently, according to Stallman, I should have the right, as the consumer, to share with all my friends the music and movies I am listening to or watching.  This sounds like a great deal.  No more heading down to the music …

[Read more]
solidDB Coming to MySQL

ZDNet (via slashdot) is running an article about MySQL and Solid working together to bring solidDB storage engine to MySQL in June. There's an announcement linked from the Solid homepage and a letter from the CEO in PDF format. I don't see anything at MySQL.com, but the announcement from Solid seems to indicate that details will be unveilded next week at the MySQL Users …

[Read more]
Foreign key constraints, DB for real

Now that I am a happy user of PHP5 and MySQL5 and using that for writing a new application, which fortunately involves using the newest technologies, I am finally able to solve one of the biggest issues I always had had with DB-driven applications: foreign key contraints.

Constraints and transactions
I am using InnoDB (I know those contraints had been possible before MySQL5) for that and the first time I am also using the foreign key constraints InnoDB provides. And it does make me happier :-). I don’t have to take care of updating and deleting all the referenced table rows myself, the DB’s storage engine does that for me, as I always had wanted it.

I had started out using MyISAM tables and triggers, but when I realized that I am programming the application using transactions I had to switch to InnoDB …

[Read more]
Showing entries 42293 to 42302 of 44885
« 10 Newer Entries | 10 Older Entries »