Lorenzo Alberton wrote:
I talked to Christopher Jones (of Oracle fame) and Lorenzo (MDB2 maintainer). Its clear that the only named parameter supporting database I know does not support dash inside named parameters. Its also dangerous since it means that whitespace typos could have serious hard to spot issues. I think a safe regexp for bound parameters would look something like: /^[a-z0-9][a-z0-9_]{0,30}$/
Since I couldn't find any official reference in
the oracle documentation, I did further tests.
[...]
so please someone revert this change ... or better yet implement the above rules.

I won't like having vendor specific rules there but a subset which works
with most/all backends and which should full-fill most user's needs. The
regexp from above looks like a good compromise for me.

This one is safer:

/^((?:\d+)|(?:[a-z][a-z0-9_]*))$/i

or better yet:

/^((?:\d+)|(?:[a-z][a-z0-9_]{0,29}))$/i


Best regards,
--
Lorenzo Alberton
http://pear.php.net/user/quipo
________________________________________________________________________
Quipo Free Internet: sicuro e veloce senza costi di attivazione e senza
canone, 2 e-mail da 25 Mb, 150 Mb di spazio web e molto di più!
Registrati gratis: http://www.quipo.it

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to