MySQL a binarni data

Martin Kavalec kavalec na vse.cz
Čtvrtek Prosinec 7 14:19:28 CET 2000


On Thu, Dec 07, 2000 at 01:09:14PM +0100, Michal Krause wrote:
> mysql_preparsed_query(QUERY_T *q)
> {
> [...]
> }
> 
> To by se mi libilo :)

Me taky. Kdyby se to jmenovalo prepared_statement, bylo by to
jeste hezci :-)

> >  Chlape co se do toho PHP podivat:
> 
> To vis, lenost. Myslel jsem, ze mi reknes "hodi pred nuly backslashe a
> MySQL pak vi, ze tahle nula neni konec stringu" a ja si reknu "aha, to
> jsem nevedel, takze to muzu delat take tak"  :)

Jeste jeden hint (z dokumentace k MySQL C API)

`mysql_escape_string()'
-----------------------

`unsigned int mysql_escape_string(char *to, const char *from, unsigned
int length)'

Description
...........

Encodes the string in `from' to an escaped SQL string that can be sent
to the server in a SQL statement, and places the result in `to'.
Characters encoded are `NUL' (ASCII 0), `\n', `\r', `\' and `''
(*note Literals::.).
...

Vyzkousene to nemam, ale tusim k cemu je to dobre :-)

Nehledal jsem to ani ty 2 minuty, takze se to obejde i bez piva
:-)

Zdravi
martin


Další informace o konferenci Test