Is it possible you have NULLs in pw_1? The most logical thing that comes to 
mind is the exceptions are not returning the expected data type. Does MySQL 
have the equivalent of the VFP NVL() function?

--

rk
-----Original Message-----
From: ProfoxTech [mailto:[email protected]] On Behalf Of Virgil 
Bierschwale
Sent: Monday, February 09, 2015 8:58 AM
To: [email protected]
Subject: Re: [NF] Unreliable MySQL select

sends a true in the column called payday or a false depending on whether it is 
larger or smaller then the xml code parses the cursor and in the html code for 
google maps, it takes the true or false and turns on a red or blue.

All of that works, what doesn't work reliably (sometimes it does, and sometimes 
it doesnt) is this part in vfp type code

m.govamtpaid = 85320
m.amtpaid = pw_1

if m.amtpaid > m.govamtpaid
   flag = .T.
else
   flag = .F.
endif

supposedly that can all be done in the mysql select statement like I'm doing, 
and it appears to work, just not reliably which is puzzling to put it nicely.



On Sun, Feb 8, 2015 at 11:16 PM, AndyHC <[email protected]> wrote:

> Iif(CAST(pw_1...   ??
>
>
> On 09/02/2015 02:42, Virgil Bierschwale wrote:
>
>> $query = "SELECT *, if(CAST(pw_1 as DECIMAL)  > 85320, 'TRUE', 
>> 'FALSE') as PAYDAY FROM lca2015 WHERE left(LCA_CASE_8,7) = 
>> '15-1121'";
>>
>>
>>
> <snip>
>


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/cy1pr10mb0218c59e70ce1d193b7a5a28d2...@cy1pr10mb0218.namprd10.prod.outlook.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to