Home |  MySQL Buzz |  FAQ |  Feeds |  Submit your blog feed |  Feedback |  Archive |  Aggregate feed RSS 2.0 English Deutsch Español Français Italiano 日本語 Русский Português 中文
Showing entries 1 to 2

Displaying posts with tag: short (reset)

Managing a Bestseller
Employee +0 Vote Up -0Vote Down
There are a couple of bookstores in my neighborhood. They could not be more different from one another.

The first is known to focus on best seller lists, to promote popular books, and use displays and traditional retail techniques to drive business. They seem to do well, year in, year out. The other bookstore is more of a community treasure, beloved by the neighborhood, with a focus on the (thoughtful) insights of their staff. Those insights are delivered via small note cards appended to shelving throughout the store, where books are displayed alphabetically, with library-like neutrality.

The first store is very market focused, changes with the season, and seems to be quite succesful. The latter store, beloved though it may be, struggles to stay in business.

  [Read more...]
Using short if statement in programming
+0 Vote Up -0Vote Down

In many programing languages it is possible to shorten if statements using what’s called the ternary operator. It is sometimes referred as the “one line if statement” or the “short if statement”. This can help at times to produce cleaner code, however use this operator wisely as it is not always best to be used for more complicated statements.

PHP Example of an if statement


1
2
3
4
5
6
7
8
if($nFoo > 0)
{
   echo "I'm at the work.";
}
else
{
   echo "I'm at home.";
}

PHP Example using the ternary operator


1
echo $nFoo > 0 ? "I'm at the work." : "I'm at home.";

The expression (expr1) ? (expr2) : (expr3) evaluates to expr2 if

  [Read more...]
Showing entries 1 to 2

Planet MySQL © 1995, 2014, Oracle Corporation and/or its affiliates   Legal Policies | Your Privacy Rights | Terms of Use

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.