Home  |  Linux  | Mysql  | PHP  | XML
From:dshesnicky@yahoo.com Date:Sun Aug 10 09:07:53 2008
Subject:what's <<"SQL" do?
Quick question, I have a chunk of code from a previous coder:

 $member = $dbh->selectrow_array( <<"SQL" );
 SELECT whatever FROM DATA
 SQL

I'm not familiar with the syntax? Is the <<"SQL" string just replaced
by the text up to the "SQL" on a line by itself so functionally it
could
be written:

  $member = $dbh->selectrow_array
    ("SELECT whatever FROM DATA");

and if so why do it the other way, perhaps because it's easier to
form a long length query?

 $member = $dbh->selectrow_array( <<"SQL" );
 SELECT whatever ...
 more
 more etc.
 SQL

Don

Navigate in group perl.dbi.users at sever nntp.perl.org
Previous Next




  
© No Copyright
You are free to use Anything
Site Maintained by PHP Developer
Powered By PHP Consultants