Re: [PHP] Selecting between using letters

2003-12-29 Thread Thorsten Schmidt
Doug Parker wrote:

How would I create a select statement in MySQL that would return a range of
records from the LastName field where the value starts with a designated
letter - for example, returning the range where the first letter of LastName
is between A and E...
Any help would be greatly appreciated.




http://www.phreshdesign.com
 

SELECT  * FROM  `user` WHERE lastname >  'A' AND lastname <  'E'

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] if("NANC" < 0) - always evaluates TRUE...

2004-01-06 Thread Thorsten Schmidt
Ivo Pletikosic wrote:

...no matter what follows the NANC...seems like a bug.

if("NA" < 0)
{
  print("err 1\n");
}
if("NAN" < 0)
{
  print("err 2\n");
}
if("NANC" < 0)
{
  print("err 3\n");
}
if("NANCY" < 0)
{
  print("err 4\n");
}
// output
err 3
err 4
 

Same behaviour here,

PHP Version 4.3.4 under Linux debian 2.2.17

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php