develooper Front page | perl.dbi.users | Postings from February 2001

Passing array in SELECT statement giving err.

Thread Next
From:
David Jacobowitz
Date:
February 26, 2001 17:45
Subject:
Passing array in SELECT statement giving err.
Message ID:
F2762UAaTzvb5YI9IJs00005151@hotmail.com
Hello,

I have constructed an array using my table field names and trying to pass 
that array in the select statement.

@inc_re = ( Hotels, Asian_Real_Estate, Smart_Buildings, Real_Estate, 
Senior_Living_Homes );

$quary = "SELECT @inc_re FROM incu_real_estate LIMIT 1";

But I am getting following error.

..]$./test.pl
In string, @inc_sf now must be written as \@inc_sf at ./test.pl line 15, 
near "SELECT
@inc_sf"

I have added a \ infront of the array but the quary doesn't return any 
thing.

Any suggestions?

Thanks for any help.

David.
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About