Re: Writing bzcompressed data into SQL-DB?
From: Michael Austin (maustin_at_firstdbasource.com)
Date: 08/21/04
- Next message: Oleg: "Importing Inventory"
- Previous message: Nuno Paquete: "Re: String manipulation."
- In reply to: Oliver Spiesshofer: "Writing bzcompressed data into SQL-DB?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 21 Aug 2004 14:26:01 GMT
Oliver Spiesshofer wrote:
> Hi,
>
> when compressing strings with bzcompress, I have the problem that the
> result apparently often contains 'letters' that mess up sql statements.
>
> Of course I can urlencode the string, but that wont keep it as small.
> What would be the best way to send a bzcompressed string to a SQL
> statement? is it possible at all without urlencode?
>
> thanks
>
> Oliver
>
Unless it is a password where the data is short enough or the data is NEVER used
in a select statement (using LIKE '%some text%' I would advise to NOT compress
the data. REtreiving the data or selecting on the data will cause a performance
hit you may not want to experience.
As long as the data is enclosed in single-quotes and you can guarantee that the
compressed data won't use single-qoutes, then you shouldn't have any problem.
If you urlencode your data you have another degree of obfuscation that will
translate into performance degradation.
Writing a web app based on testing one single connection is a problem waiting to
happen. Don't code with the mis-conception that if it works for one query it
will work for thousands per hour...
-- Michael Austin. Consultant - Not Available. Donations still welcomed. http://www.firstdbasource.com/donations.html :)
- Next message: Oleg: "Importing Inventory"
- Previous message: Nuno Paquete: "Re: String manipulation."
- In reply to: Oliver Spiesshofer: "Writing bzcompressed data into SQL-DB?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|