On Tuesday, July 2, 2002, at 03:04 AM, Richard Lynch wrote:
> And, really, $result is about a generic a variable name as $i > > How about using $user_info or even $user_info_result? > > Yes, I know every example and every PHP book on the planet uses $result. > That doesn't make it right :-) I hear you -- I used to use longer names for my SQL queries -- like $user_update_sql or $filerequest_result. But once I had moved most of my code into object methods and functions (and therefore out of the global namespace/scope/whatever), I realized this really didn't matter as much. In fact, for consistency and neatness, it was better that I use only $sql or $result, since there was only ever one query in the method or function definition, and this terseness was less cluttering to my code. I completely agree if you're putting database calls into the body of a script, but if you can wrap everything into smaller scopes, it's not such a big deal. IMHO. This applies to a lot of variable names, in fact. But I agree, in the main body of the script (global scope) it is best to be descriptive. Erik ---- Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php