[python] praca s textom
Tomy Novella
tomasnovella na gmail.com
Neděle Červen 22 20:34:08 CEST 2008
vdaka velmi pekne, v zivote by ma to nnapadlo:)
mam vsak este 2 otazky:
1)
> (pozor na to, ze ruzna pythoni DBAPI maji ruzne metaznaky misto "?", viz dokumentace)
huha, no ja som sa stretol zatial len s Python DB-API v2, z coho
usudzujem, ze je to asi najcastejsie pouzivane, alebo nie?
2) trosku offtopic: nemali by sa potom prepared statements pouzivat ja
normalne v PHPcku? preco kazdy(koho poznam) pouziva miesto toho radsej
addslashes()?
3)(teoreticka)
na http://dev.mysql.com/tech-resources/articles/4.1/prepared-statements.html
som sa docital:
"Sometimes prepared statements can actually be slower than regular
queries. The reason for this is that there are two round-trips to the
server, which can slow down simple queries that are only executed a
single time. In cases like that, one has to decide if it is worth
trading off the performance impact of this extra round-trip in order
to gain the security benefits of using prepared statements."
nevie mi niekto povedat nahodou, kto uz mal vacsie zatazenie databazi,
ci je rozdiel medzi prepaerd statements a normlanymi prikazmi az taky
velky(su pri jednoduchych prikazov tie prepared statements az take
pomale, alebo je to viac-menej jedno?)
Další informace o konferenci Python