<body>

complicated mind

Thursday, March 31, 2005

Retrieving Image File from MySQL using PHP

Many people ask me about this. Database example: database name = "test" table name = "image" table column 1 = id, data type = int, special attributes = auto_increment, primary key table column 2 = image, data type = blob this is the sql script:

use test; create table image (id int(11) NOT NULL auto_increment, image blob, PRIMARY KEY(id));
this is the php script:
<?      header("Content-type: image/jpeg"); // act as a jpeg file      mysql_connect("your_host","your_db_username","your_db_password");      mysql_select_db("test"); // use the 'test' database      $query = "select image from image where id = $id";      $result = mysql_db_query("test",$query);      $row = mysql_fetch_array($result);      $img = $row['image'];      echo ("$img"); ?>
There you go, you will see the image that you store in MySQL database using blob data type. Enjoy! :D


posted by Belutz @ 3/31/2005 11:31:00 PM | links to this post

Sunday, March 20, 2005

My PC

Today, my PC's power supply is broke down. As usual, if there are some problem with my PC, I always get stress. Then I ask Yogi to accompany me to Mangga Dua Mall. Fortunately, he's going to Gambir to buy a ticket for his brother-in-law. In Mangga Dua Mall, the shop where I bought my PC is closed, so we look around for a power supply. We found some power supply, which is not cheap. Then we found a shop, that sold PC's accessories that I never saw before. Then we ask for power supply, and the price was so expensive. But then after a long talk, I finally decide to buy a power supply in that shop (not the expensive one). They say the power supply that I bought is a very good power supply, the brand is 'HEC'. And it cost me about 260 thousands rupiah for the 300w power supply. Well I hope they're right that the power supply that I bought is a very good one. And now, my PC is running well again. And luckily there's no other hardware are breakdown because of the power supply failure.


posted by Belutz @ 3/20/2005 10:45:00 PM | links to this post

Saturday...

Saturday night, I went with Yogi, Buan, Rissa and Mario. We went to BFC Bar in Jl. Jaksa. We stay there until 1 AM. After that we go to Vertigo & X Lounge in Plaza Semanggi. The cover charge is Rp. 70.000,- Luckily my friend was paying it for me :p First, we saw the X Lounge, they playing R&B songs. Then they all want to go upstairs to Vertigo. In Vertigo they playing music that I don't understand hahaha.... In there I was thinking, what's wrong with all these people? Why the willing to waste a lot of money on alcoholic drinks? And I was thinking if government make a place like this, they could get a lot of money, and they can pay the debt to other countries. But that was just a thought that would never be come true. It's impossible that government would open a place like that. After a while, we go downstairs again to X Lounge. In X Lounge I manage my self to get a sit. It's a very comfortable place with all the people dancing and drinking. I really like to observe those people and wondering what were they thinking hahaha.... Guess I'm not a 'dugem' type of person. After that we went to eat 'bubur ayam' in tebet and we went home. This are the situation in vertigo, taken with Yogi's handphone (I know it's too dark :p) Image hosted by Photobucket.com Image hosted by Photobucket.com When will I have a time not to think seriously and just enjoying my leisure time?


posted by Belutz @ 3/20/2005 10:20:00 PM | links to this post

Saturday, March 19, 2005

Using Gmail as a 1GB Virtual Drive

Taken from http://www.googletutor.com

Need another reason to get your Gmail account? How about using its generous 1GB storage capacity as a virtual drive to save and retrieve files directly from inside Windows Explorer, accessing it from a new drive you’ll find under My Computer?

Image hosted by Photobucket.com

This is accomplished by a simple installation of a third party Shell Namespace Extension called Gmail Drive, which customizes Internet Explorer. You can find it at www.viksoe.dk/code/gmail.htm. The following is taken from the web site:

    GMail Drive creates a virtual filesystem on top of your Google GMail account and enables you to save and retrieve files stored on your GMail account directly from inside Windows Explorer. GMail Drive literally adds a new drive to your computer under the My Computer folder, where you can create new folders, copy and drag’n'drop files to.

    Ever since Google started to offer users a GMail e-mail account, which includes storage space of a 1000 megabytes, you have had plenty of storage space but not a lot to fill it up with. With GMail Drive you can easily copy files to your GMail account and retrieve them again.

    When you create a new file using GMail Drive, it generates an e-mail and posts it to your account. The e-mail appears in your normal Inbox folder, and the file is attached as an e-mail attachment. GMail Drive periodically checks your mail account (using the GMail search function) to see if new files have arrived and to rebuild the directory structures. But basically GMail Drive acts as any other hard-drive installed on your computer. You can copy files to and from the GMail Drive folder simply by using drag’n'drop like you’re used to with the normal Explorer folders.

    Because the GMail files will clutter up your Inbox folder, you may wish to create a filter in GMail to automatically move the files (prefixed with the GMAILFS letters in the subject) to your archived mail folder.

    Please note that GMail Drive is still an experimental tool. There’s still a number of limitations of the file-system (such as total filename size must be less than 40 characters). Since the tool hooks up with the free GMail Service provided by Google, changes in the GMail system may break the tool’s ability to function. I cannot guarantee that files stored in this manner will be accessible in the future.

There you go.

---------------------- I have tested this, and it works fine for me. But I got errors when I try to paste a lots of files to the gmail drive, but it works fine when I paste just a few files. This is great for backing up important files. And yes, it can't receive files with long filenames, so you must rename it into shorter filenames. And when I log in to the gmail using the browser, I could see the file I've paste using Windows Explorer, and the files works fine. Well there's no harm in trying it :p


posted by Belutz @ 3/19/2005 05:22:00 AM | links to this post

Friday, March 11, 2005

Friday....

Today is a holiday. I didn't go anywhere in the afternoon. I helped Natalie to install Apache and PHP through MSN Messenger. It takes a longer time, because of miscommunication :p Then, in the evening I went to EX with Natalie, Firman, Toby, July and Edwin. Just another boring day...


posted by Belutz @ 3/11/2005 11:59:00 PM | links to this post

Monday, March 07, 2005

Notebook and Cable Internet

At last, I can have my own notebook. It's a NEC Versa M540. And I got cable connection now. Two great things at the same time :p I'll tell you more about the notebook later, after I fully tested it. This is the picture of the notebook: Image hosted by Photobucket.com


posted by Belutz @ 3/07/2005 10:27:00 PM | links to this post

Sunday, March 06, 2005

Java Jazz?

hmmm.... jadinya ngga sempet nonton Java Jazz deh. Padahal pengen banget nonton Java Jazz. Ga jadi nonton karena mesti ngirit nih. Selain itu, takut disana ketemu seseorang yang bisa membuka luka lama yang masih dalam tahap penyembuhan. Ya, ga apa-apa deh... dengerin jazz di kost aja, sama aja hehehe


posted by Belutz @ 3/06/2005 06:41:00 PM | links to this post

my mood: The current mood of belutz at www.imood.com

belutz7978
Name :
Web URL :
Message :

Who Links Here

BlogFam Community

Free Shoutbox Technology Pioneer

Powered by Blogger
Subscribe with Bloglines
Get Firefox!
XFN Friendly

Ubuntu Linux

Gelang Merah Untuk Anak Indonesia

Listed on BlogShares



Creative Commons License

Design by Beccary