Re: Comparing strings as ants^H^H^H^Hints

2001-10-30 Thread Sommai Fongnamthip

Some programming language in some platform could compare this string 
numeric.  But, Why not use it in real numeric value (no quote) or use 
convert method before compare?

SF

At 13:24 30/10/2001 +0900, Joel Rees wrote:
I don't have any experience with SQL, but I'm thinking that zero filling
both might work:

Although '5' = '40' is false,

'0005' = '0040'

is true.

But since you should be using some glue code to validate the field from the
web page anyway, can you just push the form field into a numeric before
passing it to SQL? Would that do any good?

Joel Rees
[EMAIL PROTECTED]

PS: Do posts tend to group around themes?

Daniel James [EMAIL PROTECTED] wrote:

[snipped]

  Here is the problem another way...
 
  select '5' = '6';
  = 1
  select '5' = '4';
  = 0
  select '5' = '40';
  = 0- eegad.
 
  does anyone know how I can get around this?



-
Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail 
[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Comparing strings as ants^H^H^H^Hints

2001-10-29 Thread Joel Rees

I don't have any experience with SQL, but I'm thinking that zero filling
both might work:

Although '5' = '40' is false,

'0005' = '0040'

is true.

But since you should be using some glue code to validate the field from the
web page anyway, can you just push the form field into a numeric before
passing it to SQL? Would that do any good?

Joel Rees
[EMAIL PROTECTED]

PS: Do posts tend to group around themes?

Daniel James [EMAIL PROTECTED] wrote:

[snipped]

 Here is the problem another way...

 select '5' = '6';
 = 1
 select '5' = '4';
 = 0
 select '5' = '40';
 = 0- eegad.

 does anyone know how I can get around this?



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php