Alaa Abdelhaq Blog
20 Jan
You are having hard time with mysql datetime format? I wont blame you ![]()
I hope this short example will help you.
let say in your mysql database you are saving time on the datetime format
like this “2009-01-20 02:11:05″.
you need to pull it and add some days or time intervals and print it in a different format, thats easy do the following
1- In your query pulling the time, pull it this way:
UNIX_TIMESTAMP(time) AS time |
this will covert it into unix timestamp, which will make it easier for you to manipulate it with php functions.
2- Add your time interval, let say we need to add 15 days.
$unix_timestamp_from_database = 1232410265; $time_from_db = $unix_timestamp_from_database; $new_time = $time_from_db + (15 * 86400); |
86400seconds equals one day.
In unix timestamp we manipulate time by seconds.
so if you want to add an hour you add it like by (60 * 60)
which equals 3600 seconds.
3- Then you format it as you desire:
$new_time_format = date("d-M-Y", $new_time); echo $new_time_format; |
hope it will help you
18 Jan
I started to feel am getting old in age, life is getting boring everyday.
I may started to feel lonely and started to feel the need for a girl in my life.
I need some real descent relation in my life, that may be translated into marriage!!
I know am crazy but yeah marriage!!!
So whats next? start looking around for candidates!
reality hits here!!!
No candidates ![]()
Why?
I’m an average Jordanian Muslim guy, my family too. we are neither
rich or poor, we are in the middle, and being in the middle is so hard, you wanna
move up and forward and you cant look down, and you cant step back at any cost! even if the cost was marriage itself.
Honestly I cant marry Jordanian girl, cause she and her family will swallow me like if I was a panadol pill.
Truth hurts I know!
but Why not a girl from here? I will tell you why:
1- One of her parents if not both, are greedy.
was asking some girl what is the “MAHIR” your family requires?
she said maybe 3000 JD plus the “JHAZ and shitty stuff” , I felt am talking to some merchant owner! or you can say a prostitute!! yes prostitute sorry!!
2- 90% are narrow and old fashioned minded.
3- Shallowness.
4- Brain washed.
5-Incapable of making decisions.
Girls are 2 types, either a puppet or a master of other puppets!!!
6- Not welcoming the idea of salary sharing.
7- Most of them don’t have a goal in life or dreams but to get marry and have children!
8-they say they ambitions, but when you ask her what is your dreams, she just shut-up.
9-They want to live like their mothers and grand-mothers, they are not thinking to break the cycle and search for different life.
10-they dunno the meaning of adventures.
11-they want to be equal with men, they study go to universities and work as men, secure good positions and some times they own businesses, but when it comes to marriage, they hate equality
, how ironic.
Believe me I have millions of other reasons!!
I was so crazy to think of marriage.
I came back to my mind and I will never think of it again!
My post does not apply for all girls, am not stereo typing here!
but majority are
I will appreciate sharing with me your thoughts.
15 Jan
Was driving yesterday and I came by this great song on the radio.
The song called “Gaza: We will not go down”.
By: Michael Heart.
If you like the song you can download it from his website.
I provided the lyrics too:
(more…)
Recent Comments