Re: [PHP] Re: Broken IF behavior? (Changing the branch changes the evaluation)

2009-07-29 Thread Matt Neimeyer
$Ret = mysql_fetch_array($result); if(!$Ret) { } else { return $Ret; } I'm assuming that you are calling my_fetch_array() in a loop of some sort and so at some point there are no more records in the result. Oh... Um... Yeah... Well... headdesk So... Checking the docs... Returns an array of

RE: [PHP] Re: Broken IF behavior? (Changing the branch changes the evaluation)

2009-07-29 Thread Ford, Mike
-Original Message- From: Matt Neimeyer [mailto:m...@neimeyer.org] Sent: 29 July 2009 16:47 $Ret = mysql_fetch_array($result); if(!$Ret) { } else { return $Ret; } I'm assuming that you are calling my_fetch_array() in a loop of some sort and so at some point there are no more

Re: [PHP] Re: Broken IF behavior? (Changing the branch changes the evaluation)

2009-07-29 Thread Shawn McKenzie
Ford, Mike wrote: -Original Message- From: Matt Neimeyer [mailto:m...@neimeyer.org] Sent: 29 July 2009 16:47 $Ret = mysql_fetch_array($result); if(!$Ret) { } else { return $Ret; } I'm assuming that you are calling my_fetch_array() in a loop of some sort and so at some point there

[PHP] Re: Broken IF behavior? (Changing the branch changes the evaluation)

2009-07-28 Thread Shawn McKenzie
Matt Neimeyer wrote: Background: I'm converting a webapp from Visual FoxPro as a backend to MySQL... However one part of our app (a system status checker) is common code between the versions. I've got the following function... In English (in case it's not apparent), if the version of the