Monthly Archives: December 2007

have you ever thought how a very simple mysql insert query can be so frustrating!! grrr! was coding for the cms and had to write this idiotic query!!

$formdesc_query=”INSERT INTO `form_desc` (`page_modulecomponentid` ,`form_heading` ,`form_loginrequired` ,`form_headertext` ,`form_footertext` ,`form_expirydatetime` ,`form_sendconfirmation` ,`form_usecaptcha` ,`form_allowuseredit` ,`form_allowuserunregister` ,`form_showuseremail` ,`form_showuserfullname` ,`form_showregistrationdate` ,`form_showlastupdatedate`) VALUES ($compId, ‘”.mysql_escape_string($formdesc_content['form_heading']).”‘, ‘”.mysql_escape_string($formdesc_content['form_loginrequired']).”‘, ‘”.mysql_escape_string($formdesc_content['form_headertext']).”‘, ‘”.mysql_escape_string($formdesc_content['form_footertext']).”‘ , ‘”.mysql_escape_string($formdesc_content['form_expirydatetime']).”‘ , ‘”.mysql_escape_string($formdesc_content['form_sendconfirmation']).”‘, ‘”.mysql_escape_string($formdesc_content['form_usecaptcha']).”‘, ‘”.mysql_escape_string($formdesc_content['form_allowuseredit']).”‘, ‘”.mysql_escape_string($formdesc_content['form_allowuserunregister']).”‘, ‘”.mysql_escape_string($formdesc_content['form_showuseremail']).”‘, ‘”.mysql_escape_string($formdesc_content['form_showuserfullname']).”‘, ‘”.mysql_escape_string($formdesc_content['form_showregistrationdate']).”‘, ‘”.mysql_escape_string($formdesc_content['form_showlastupdatedate']).”‘)”;

The arbitness of time and the highly jobless soul of mine forced me to write this uncanny post which while being written provoked me to think a lot about U!! :P

ps: hmmm, its so different..!

hmm… Well its weird. Actually nothing new for me. Lately everything is getting weirder and more weirder for me. But this one is something on which even you will agree because its so uncanny..!

Those who orkut will surely agree with me on this.. and are not psycos like the cases which i have mentioned here later on in this post! You must have come across this “send to all” feature on orkut somewhere or the other, unless you do not have a single person in your friend list!! I stopped orkutting some time back.. Very rarely i used to go online there and write on someone’s scrapbook, that also being one of my very close friends whom i have not contacted for sometime…

But these days people just send scraps to anyone and everyone without thinking.. there are some acquaintances whom you just add bcoz they are from same college.. or have a common friends. Its so weird that people hardly know everyone and send a common scrap!!

you would not have even seen the person.. sometimes you wont even know his/her name and then also you ll send something like

hiiiiii how r u??? howz life gng?? rly,tc,bye

its even more arbit at times..

Hi, I lost my brand new NATRAJ HB pencil with a rubber attached. The pencil costs Rs.3/. If u forward this msg I will get one paisa from yahoo. If you have heart and want to help a poor child in need, plz fwd it to atleast 10 friends. Please don’t neglect. Otherwise my mom will scold me. If you forward it then your life will change for ever (u will get one pack of sketch pens and an apsara non-dust eraser within 3 days). Do NOT delete this message otherwise greek gods will get angry with you and your life will be pencil-less forever. Good Luck will come to you for wasting time
hahahaahahahahahahanahahahahahhahahahaha

 

Isnt a post like this irritating.. i just feel like kicking the sender’s a**! sorry! :)

well there are some funny cases also like this one

hi.let me know that u hv received this scrap………..

or some desperate ones like this

Anyone online???
i m getting bored…

One more thing that annoys me a lot is that they keep sending something like

this is from Diana, the director of orkut…orkut if gonna delete your profile in one month…blah blah

or something like jai mata di, send this to all and you ll pass in your examinations..

or sometimes like this poor girl is in need and needs some cash, plz forward the scrap..!

Well people have got addicted to orkut now.. i have seen cases who just live here…24 hours! I noe this because they keep sending some arbit stuff abt joining some stupid community or some forward and i get notifications on my gmail account. Well, i guess its high time for me to change my orkut settings..

It was started as a social networking site.. where people can meet others.. maintain contact as you cant keep calling everyone, or even for professional purpose(have seen so many communities where actually discuss abt work, technical stuffs, business, books etc). Some times all this is fun..but only sometimes..! its getting irritating now!

Am actually planning to delete my orkut account. There are much better ways for maintaining contact like mail, instant messenger, or even writing posts! yeah i m talking abt the sending letters! i noe its a slow process but its not irritating!

Orkut was meant for social networking and not social addiction or mass chaaating!!!

ps: If you are so sure about it, say it aloud!! Let everyone hear it…!

good morning!

hmm.. such a pleasant morning.. started my day with reading some blogs.. was actually looking up in each and every blog which is there in my blogroll to see whether anyone has blogged about anything recently.. to my surprise a lot of people are actively writing blogs these days..! naiice!

By the way read this on anshu’s blog,

My first n only poem so far…

“———————————”{I don’t like the title anymore.}”

Click here to read more..

Anshu’s as a Poet. wait, more precisely a romeo poet…!

okay no more jokes. Check it out, its nice. I dint know that he will be so good at writing poems. I underestimated him a bit..! hmmm, learnt my lesson.. never under estimate a romeo, he can be a good writer at times! There is a saying in hindi “har gadhe ka din aata hai“. Changed the saying a bit! :)

hmmm.. don worry, i wont try this out at least!! not my up if tea..!!

Anshu, keep it up.. and keep more of your inner thoughts flowing our like this.. its a really nice compiled poem..!

by the way dear reader, i was not joking abt the poem, its really nice! do check it out!

ps: again, i guess!!!

“Do not mistake temptation for opportunity.”

hello! finally got up after 6 hrs of a nice sleep in which i watched half of the epic movie, got bitten by mosquitoes because there was no current in the hostel, woke up some 7 times because of msgs.. twice because someone called..and once bcoz that idiot glenn was banging the door…! grrr.. i m gonna kill him for disturbing me when i was sleeping!!!!

a

grr.. chalo lets get bak to some serious work now!

 

ps: a msg is meant for a msg!

its almost 24 hrs since i came to octa.. had been here since then.. just went out for lunch and dinner.. did some work i guess!!

btw from the list.. just managed to finish only one.. and the second one almost done.. there is just one bug.. which i m not able to figure out.. so will come bak after lunch and check it..

till then.. sayonara!

ps: hmmm…good morning, na.. actually good night!!!

This is what we call external javascript too..

Anyway save your .js file as .php. For example, your js file will be named as file.php

The syntax to referencing a PHP file using external JavaScript is almost same as what we normally do for JS files:

<script type=”text/javascript” src=”file.php”></script>

where “file.php” is either an absolute or relative path to a PHP script instead of the usual .js file. Paramenters can also be passed to the PHP file by using the URL string:

<script type=”text/javascript” src=”file.php?id=3&name=hmmmsup”></script>

PHP Script can get these parameters using the global variable $_GET. I know, you may be wondering whats the catch here? Hmmm, actually there is no catch involved here, just some limitations. Since the PHP script is being invoked indirectly and via JavaScript, the final output of the PHP script should be a valid JavaScript. It can be considered as a dynamic .js file!

In the normal PHP script called inside a PHP page, the output is a raw HTML data and the source code can be modified using the script, but thats not the case with JavaScript invoked version though…Anyway there are loads of things which can be done using this!

ps: it had been a long day!

hmmm.. good morning! my dad used to say.. u should get up early in the morning around 4-4:30 am and then study!! well i dint do any of that sort when i was a kid..!

haha.. anyway there should had been a good night before a good morning!!

still working.. actually finally started working! sahil just left.. i guess he wasnt feeling well.. he is down with fever for the last two days.. anyway he has given a list of work to be done since i dint want to sleep today!!

it goes something like this

1. move the pragyan menu js in a seperate js file including it directly in the php code.

2. make a submit button for a php form generator form and verify it.

3. make a sub-action of editing the elements of the form!

can you get head or tail out of this? atleast i cant! looks like some alien language to me!!! good thing is that form work has finally started! got too busy with arbit arbit work that could not do the actual work till now.. and abhilash is also working now.. over the internet.. good!

well svn and trac rocks! cant imagine what we would have done without them…! the best part is that svn is online now.. so anyone from anywhere can work on the code.. and trac is also there so work can also be regulated properly!! nice.. !

anyway should start busting my head over this list… actually bcoz there is nothing else to do also!! dont want to sleep.. and to bored with arbit surfing and reading blogs..

chalo bye..

ps: finally!

hmmm.. dint get much info about copying a row in mysql, so thought will put the code here.. its useful sometime..

the code is

INSERT INTO destinationTable (column_list) (SELECT column_list FROM sourceTable WHERE condition=check)

replace the condition with your condition.

To copy within the same table, the destination and the source table will be the same. And if you have an auto_increment counter in your table then do not include that column in the list!

chalo happy querying!

ps: that one should have come long back!

hmm.. two days since i got back here.. its so unusual to be in college at this time when almost everyone has gone back home for sem hols and just a bunch of jobless guys are here!

had gone to almost all the places where i liked to go.. continuously sat in octa for 14 hrs!! hmm wat else? kept checking mail during that time.. tried a lot to blog.. but could not! or forced myself not to write some crap here.. started writing technical stuf.. its good and fun! you get to noe a lot of things! actually this post is not required.. it does not mean anything.. i m writing this bcoz i had to write that.. so thats why i am chaating u so much.!!! even i m bored.. not because there is noone here though!

btw saw “the amityville” yesterday again! glenn almost pissed in his pants! he was so scared that he kept the lights open through out the night and even asked me to accompany him to the toilet which is just two rooms away! btw i even heard some noises at night.. while sleeping.. dint bother abt them at that time.. might be his! :P

chalo its time to get back to work..

ps: i hate it when my closest friends lie to me!