How to call an Oracle Function in Symfony 2

Hi All,

How are you doing? Seems like my fingers do not want me to stay away from Symfony2 despite the Spring Bank Holiday. 🙂

Today, I am going to talk about how to call an Oracle Function in Symfony2. A function (aka stored function) is a collection of SQL statements which is used to perform various different activities within the Database. The good thing about the function is you can write your chunks of SQL inside the function and call it using a name to initiate. I will be focusing on how to call an Oracle Function in Symfony2 and if you would like to know more about Oracle functions please click here.

First, let’s take a look at a sample function which I have created and is saved in Oracle 12c Database.

create or replace 
FUNCTION testFunc123(old_bname IN VARCHAR2) 
      IF old_bname = 'TEST' THEN
          RETURN 'Y';
        RETURN 'N';
      END IF;  

The role of the above created Oracle function is to check whether the value of ‘old_name’ is equal to ‘TEST’ or not. If it is ‘TEST’, then the function will return ‘Y’ otherwise ‘N’. So, now what we going to do is call this function inside a Symfony2 controller. This is really easy, thankfully to wonderful Doctrine2.

Continue reading


Gumball3000, London UK 2016

Hi folks,

How are you all doing? Last week, I got an opportunity to witness some hot, sports cars in Gumball3000. Gumball3000 was held on 2nd May 2016 (Bank Holiday) at Regent Street, Central London. That was quite fun and there were a plethora of expensive sports cars roaming through the Regent Street. I got some pictures during the event and I would like to share those images with you. Some of these images were taken by @gtiranda. Thanks Iranda for those images. Enjoy my PhotoBucket album below 🙂

Last but not least, I got my eyes lucky enough to see my childhood hero David Hasselhoff during Gumball3000 and here is the video that I have recorded 🙂

The official Gumball3000 URL :-




Hi everyone, this is a random thought which came to my mind when I was coming back home this evening. I hope you will enjoy 🙂



Sinks our whole soul, when it arrives
Unshakable flow coming along, when it hits the pot
Turning down becomes a powerless effort
Dwelling too much isn’t too good as it steals yourself from you
You will forget your breath and largest rock goes unnoticed
Standing and walking becomes lighter than never before
But, flying is still an unachievable dream
People around you will try to show the easy way out
But, this is a battle between you and yourself
Looking down as you are counting shells on the beach
Your eyes will meet everything but no shells on the sand
Continue reading


Too good heart for a too deadly war



Shaken up by a wide big tornado,
Debris all over the kingdom,
Not many places to hide and seek,
King is lying unconscious in his garden…

Armour is powerless in his soldiers,
Walls breaking apart at far four corners,
Daunting scream of stallion in the stable,
Strong gloomy fog sneaking the kingdom…

Petals falling from his roses,
Wings falling from his eagles,
Tails falling from his mermaids,
King is lying unconscious in his garden…

Continue reading


Moving into 2016!

Hello chaps,

Another year just said goodbye and new hopes, new dreams, new challenges are already booming and starting to tingle in my mind. How was your 2015? Was it a successful year? Did you manage to fulfill all or part of your to-do list, that you prepared during the end of 2014? Anyhow, this post is not to question you about how you performed in 2015, but to give you three advices to help you to shape up your year 2016.

  • Prepare a to-do list and fill it with activities you are going to engage in 2016. To make things easier, break down your to-do list to each month (Jan to Dec) and arrange your activities around each month. When arranging your tasks / activities, make sure you prioritize them according to the importance, not by the duration it will take to finish the task. Well, if a task takes good six months to successfully finish, no point you are starting it at the third quarter of the Year. A six-month long task must be a highly important task, so it should be within the first few items in first few months in your to-do list. Preparing a to-do list on its own will not put you into the right track. You need to work according to your list. So, the commitment is a key behavior you need to practice.
  • Learn new skills. Learning new things will always increase your knowledge, no matter what you do or where you coming from. A new thing can be anything such as a cooking skill, sports skill, hobby or even try to sing a song and put it into YouTube to see how your friends enjoy your voice. How about mastering the art of Espresso coffee roasting / how to make a good coffee in 2016? If your are fancy, check this post.
    Continue reading