Hi list,
I try to store/retrieve pictures into MySQL.
I know that a lot of people will say this is not a good practice, so here
are briefly my reasons:
-I want to protect that pictures (restricted access)
-I don't want to use htaccess as I want my users to be able to modify their
password
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 practice
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()
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@lists.php.net
Subject: RE: [PHP-DB] mysql - image storing
Date
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
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 db,
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
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 stripslashes
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
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
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
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 that
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
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
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
15 matches
Mail list logo