05 July 2011

When you update a mysql table you should use coma between the fields not "and"

Well i learned this the hard way... i was debugging an sql update for couple of minutes and it seems that the only error that i had was the coma between the fields. For example:

sql> update table_name set field1="value1" and field2="value2" where cond1="val1";

is wrong. Also, in some cases (randomly for me) it was resetting the existing value of "field1". The correct version should be with coma "," instead of "and", like this:

sql> update table_name set field1="value1", field2="value2" where cond1="val1";

I found my mistake using phpMyAdmin.

04 July 2011

Short URL provided by goo.gl

If you wish to share one album, you have the possibility to use short urls provided by goo.gl (google url shortening). Just click in the menu the "share this" link and you will get two nice and short goo.gl link. First one is for read only access (where guests will be able to just see your pictures) and the 2nd one is for writing access as well, where guests will be allowed to add more pictures/videos to your album.

It seems that there is a limit of 1,000,000 links / day. I hope we won't reach this limit, soon...

Thank you Google!

03 July 2011

Image album - Auto slide show

A new function was added to the alwayshere.net image listing (as requested by a friend of mine). I'm speaking about the automatic slide show, which can be used by clicking on the "play" link when viewing an image. This is not available when viewing videos...

It is also changing the "play" link to "pause" after clicking on it and the "pause" to "play".

There is a simple function who's doing all the necessary things.
function playSlide()
{
function changeSlide()
{
var curimg = document.getElementById("controlImg").innerHTML;
if (curimg == "play") document.getElementById("controlImg").innerHTML="pause";
else document.getElementById("controlImg").innerHTML="play";
}
changeSlide();

if (lock == true) {
lock = false;
window.clearInterval(run);
}
else if (lock == false) {
lock = true;
run = setInterval("changeImage(\'next\')", 3000);
}
}

alwayshere.net - allow guests to upload images to your photo albums

I'm preparing for a big event in my life now and i was searching for a tool that will allow me to give a link to a person that will allow him/her to add pictures/videos to my album. I was not able to find something like this, so i implemented it in alwayshere.net.

Here is how it's working...

  • Step 1: As the owner of the album you will find in your menu the "share this" link
  • Step 2: If this is your first time, your writing link will be generated. If this is not your first time, you will have the possibility to reset the writing link (removing previous access).
  • Step 3: Copy the writing link from the info box and share it.

Seems pretty simple, isn't it?