note 36458 deleted from function.mysql-fetch-row by pollita

From: Date: Fri, 10 Oct 2003 15:25:09 +0000
Subject: note 36458 deleted from function.mysql-fetch-row by pollita
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-58199@lists.php.net to get a copy of this message
Note Submitter: scovron(at)poczta(dot)onet(dot)pl ---- Is mysql_fetch_row doing 'stripslashes' automaticly, when geting data from BLOB fields? Well, that's my story: I was adding picture, which name was stored in variable $nazwa_pliku: $data = addslashes(fread(fopen($nazwa_pliku, "r"), filesize($nazwa_pliku))); $wynik = mysql_query("UPDATE Uzytkownik SET Zdjecie='".$data."' WHERE Login='".$_POST['Login']."';"); where 'Zdjecie' is mediumblob field. Then I was trying to retrive this picture from MySQL like this: header("Content-type: image/jpeg"); $photo = stripslashes(picture_get("Select Zdjecie From Uzytkownik Where Login='".$_GET['Login']."';")); //picture_get retrives picture from DB header("Content-Length: ".strlen($photo)); echo $photo; and the picture was messed up (it's size was diffrent, than original). But when I didn't use stripslashes function, it was ok.

« previous php.notes (#58199) next »