LPM: "" interpolates method calls?

Joe Hourcle oneiros at dcr.net
Sun Nov 28 15:50:35 CST 1999



On Sun, 28 Nov 1999, Rich Bowen wrote:

> $sth = $dbh->prepare("select * from" . $foo->method .
>      "order by date_time desc");
> 
> Note lack of spaces before and after $foo->method, which causes things
> to break. Languages that care about whitespace irritate me!

It's things like this, especially when building complex SQL queries, where
it comes in handy to put the string in a variable first, jsut so you can
access it when debugging to see if there's something wrong with it.

(of course, my realization when I was doing stuff like this was in VBA,
which will only show so many characters of a string, so I had to have it
open a form, and place the string in the field, and keep *@$#%^ing
switching back and forth, etc.)

-Joe




More information about the Lexington-pm mailing list