On 13/08/2016 08:42, Lester Caine wrote:
Is starting just a Firebird SQL thing or is it more generally available.
I do a few google searches but as usual when searching for things like
'starting' one gets hundreds of pages on 'running' the software and it's
other connotations.

I've never come across it in Postgres, MS SQL Server, or MySQL. Generally LIKE 'abc%' is the recommended approach (and will I think hit the index in many cases, because the DBMS can optimize the case of a prefix match if it knows at planning time). A "starting" keyword would certainly be useful if it was there. :)

It doesn't quite fill the same need as a PHP function, of course, because you might be checking user input, or API results, or all sorts of things that won't, or haven't yet, hit the database. Currently the common idiom for that is the ugly strpos($string, 'abc') === 0

Regards,
--
Rowan Collins
[IMSoP]



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

Reply via email to