May 10, 2009
PHP/MySQL lesson #X+1
So I've been struggling with this image gallery of mine... Not very relaxing! I wanted to upload images into my database and found a script tutorial for that easily enough. Done. Voila!
Then I wanted to display many of the images from my database at the same time. On my webpage. How the hell does that work??? I know how to search for them but how do I display the blob?
I searched the web again and found script after script but none of them were working! I looked for errors in the code (oh and there were errors!), tried moving things around, nothing helped. The error messages just changed... I was getting error messages, seeing a blank page... the highlight was seeing blank squares that were supposed to be images!
Turns out the code was working just fine...
But nobody told me that the table with the images isn't supposed to carry any other information (like tags for example)! As soon as I removed all the non-essential columns in my images table the script started working. Hooray!
So ONLY include the columns: id, name, size, type and content (or data, as some tutorials preferred to call it). Nothing else!
Rant over. I hope some poor soul finds this and is saved some trouble...
PS: If I'm getting something wrong please tell me. I am one of those who don't mind not knowing how a script works as long as it works. I'd love to actually study this stuff but I have other priorities.
April 11, 2009
New Blog coming soon!
November 03, 2008
I'll follow the Sun
Original guitar video by adrianholovaty.
September 27, 2008
Jokes #2
On their way to a justice of the peace to get married, a couple has a fatal car accident. The couple is sitting outside heavens gate waiting on St. Peter to do the paperwork so they can enter. While waiting, they wonder if they could possibly get married in Heaven. St. Peter finally shows up and they ask him. St. Peter says, “I don’t know, this is the first time anyone has ever asked. Let me go find out,” and he leaves.
The couple sit for a couple of months and begin to wonder if they really should get married in Heaven, what with the eternal aspect of it all. “What if it doesn’t work out?” they wonder, “Are we stuck together forever?” St. Peter returns after yet another month, looking somewhat bedraggled. “Yes,” he informs the couple, “you can get married in Heaven.” “Great,” says the couple, “but what if things don’t work out? Could we also get a divorce in Heaven?”
St. Peter, red-faced, slams his clipboard onto the ground. “What’s wrong?” exclaims the frightened couple. “Geez!” St. Peter exclaims, “It took me three months to find a priest up here! Do you have any idea how long it’s going to take for me to find a lawyer?”
How many actors does it take to change a light bulb?
1) Five. One to climb the ladder, four to say “That should be me up there!”
2) None. The stunt double does it for them.
A burglar broke into a home and was looking around. He heard a soft voice say, “Jesus is watching you". Thinking it was just his imagination, he continued his search. Again the voice said “Jesus is watching you". He turned his flashlight around and saw a parrot in a cage. He asked the parrot if he was the one talking and the parrot said, “yes.” He asked the parrot what his name was and the parrot said, “Moses.” The burglar asked, “what kind of people would name a parrot Moses?” The parrot said, “the same kind of people who would name their pit bull Jesus".
September 25, 2008
Jokes #1
Officer: “Soldier, do you have change for a dollar?”
Soldier: “Sure, buddy.”
Officer: “That’s no way to address an officer! Now let’s try it again!”
Officer: “Soldier. Do you have change for a dollar?”
Soldier: “No, SIR!”
An old man was on his death bed, and wanted to be buried with his money. He called his priest, his doctor and his lawyer to his bedside. “Here’s $30,000 cash to be held by each of you. I trust you to put this in my coffin when I die so I can take all my money with me.”
At the funeral, each man put an envelope in the coffin. Riding away in a limousine, the priest suddenly broke into tears and confessed, “I only put $20,000 into the envelope because I needed $10,000 to repair the roof of the church.”
“Well, since we’re confiding in each other,” said the doctor, “I only put $10,000 in the envelope because we needed a new X-ray machine for the pediatrics ward at the hospital which cost $20,000.”
The lawyer was aghast. “I’m ashamed of both of you,” he exclaimed. “I want it known that when I put my envelope in that coffin, I enclosed a check for the full $30,000.”
A woman walked into the kitchen to find her husband stalking a round with a fly swatter.
“What are you doing?” she asked.
“Hunting flies,” He responded.
“Oh, killing any?” She asked.
“Yep, three males, two females,” he replied.
Intrigued, she asked, How can you tell?
He responded, “Three were on a beer can, two were on the phone.”
This morning as I was buttoning my shirt, a button fell off. After that, I picked up my briefcase, and the handle fell off. Then I went to open the door, and the doorknob fell off. I went to get into my car, and the door handle came off in my hand. Now I’m afraid to pee.