Re: [PHP-DB] mysql - image storing

2005-01-18 Thread Jochem Maas
Martin Norland wrote: Jochem Maas wrote: I was always under the impression that single quotes (assuming you are delineating you args with single quotes) should (officially) be escaped with another single quote - although backslash also works: "INSERT INTO status (hunger) values ('I''ve just eate

Re: [PHP-DB] mysql - image storing

2005-01-18 Thread Jochem Maas
Simon Rees wrote: On Tuesday 18 January 2005 19:18, Jochem Maas wrote: I was always under the impression that single quotes (assuming you are delineating you args with single quotes) should (officially) be escaped with another single quote - although backslash also works: I think it depends on the

Re: [PHP-DB] mysql - image storing

2005-01-18 Thread Martin Norland
Jochem Maas wrote: I was always under the impression that single quotes (assuming you are delineating you args with single quotes) should (officially) be escaped with another single quote - although backslash also works: "INSERT INTO status (hunger) values ('I''ve just eaten.');" ...alot of real

Re: [PHP-DB] mysql - image storing

2005-01-18 Thread Simon Rees
On Tuesday 18 January 2005 19:18, Jochem Maas wrote: > I was always under the impression that single quotes (assuming you are > delineating you args with single quotes) should (officially) be escaped > with another single quote - although backslash also works: I think it depends on the database th

Re: [PHP-DB] mysql - image storing

2005-01-18 Thread Jochem Maas
Joseph Crawford wrote: Jason, can you explain why stripslashes should not be used on data taken from the db? when you store data in the db i thought it was good although 'slashing' text works pretty much all of the time (possibly the guys using exotic encodings all day will say different :-) but t

RE: [PHP-DB] mysql - image storing

2005-01-18 Thread Ford, Mike
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm On 18 January 2005 17:11, Joseph Crawford wrote: > Jason, can you explain why stripslashes should not be used on data > taken from the db? when you store data in the db i thought it

Re: [PHP-DB] mysql - image storing

2005-01-18 Thread Jochem Maas
Martin Norland wrote: Joseph Crawford wrote: Jason, can you explain why stripslashes should not be used on data taken from the db? when you store data in the db i thought it was good practice to addslashes, when you retrieve from the db, you will need to use stripslashes to remove the extra \ The

Re: [PHP-DB] mysql - image storing

2005-01-18 Thread Jason Wong
On Wednesday 19 January 2005 01:51, [EMAIL PROTECTED] wrote: > > Jason, can you explain why stripslashes should not be used on data > > taken from the db? when you store data in the db i thought it was good > > practice to addslashes, when you retrieve from the db, you will need > > to use strips

Re: [PHP-DB] mysql - image storing

2005-01-18 Thread Martin Norland
Joseph Crawford wrote: Jason, can you explain why stripslashes should not be used on data taken from the db? when you store data in the db i thought it was good practice to addslashes, when you retrieve from the db, you will need to use stripslashes to remove the extra \ The slashes are added for t

Re: [PHP-DB] mysql - image storing

2005-01-18 Thread dpgirago
> Jason, can you explain why stripslashes should not be used on data > taken from the db? when you store data in the db i thought it was good > practice to addslashes, when you retrieve from the db, you will need > to use stripslashes to remove the extra \ If I may step in... Assuming a MySQL d

Re: [PHP-DB] mysql - image storing

2005-01-18 Thread Joseph Crawford
Jason, can you explain why stripslashes should not be used on data taken from the db? when you store data in the db i thought it was good practice to addslashes, when you retrieve from the db, you will need to use stripslashes to remove the extra \ -- Joseph Crawford Jr. Codebowl Solutions [EMAI

RE: [PHP-DB] mysql - image storing

2005-01-18 Thread mel list_php
..I also tried with several header option as I thought it may be the problem as if I just echo the data without the header they look like "normal " data for a picture... Thanks for the reply. From: "Bastien Koert" <[EMAIL PROTECTED]> To: [EMAIL PROTECTED], php-db@lis

Re: [PHP-DB] mysql - image storing

2005-01-18 Thread Jason Wong
On Tuesday 18 January 2005 19:30, mel list_php wrote: [snip] > $donnees=stripslashes($row[donnees_binaires]); [snip] > -I tried different combinations with addslashes/stripslashes, trim in case > of spaces, mysql_real_escape_string... I haven't looked at your code in detail but stripslashes()

RE: [PHP-DB] mysql - image storing

2005-01-18 Thread Bastien Koert
so what exactly is the problem? bastien From: "mel list_php" <[EMAIL PROTECTED]> To: php-db@lists.php.net Subject: [PHP-DB] mysql - image storing Date: Tue, 18 Jan 2005 11:30:12 + Hi list, I try to store/retrieve pictures into MySQL. I know that a lot of people will say this is not a good pract