Home: Perl Programming Help: DBI:
Help on mysql query



rajiv_chennai
Novice

Feb 9, 2008, 12:39 AM


Views: 5164
Help on mysql query

 

Code
my $select=$dbh->selectrow_hashref("SELECT mfqno FROM hq_stock_details WHERE mfqno = (SELECT max(mfqno)FROM hq_stock_details where mfqno LIKE \'XTC\%\' )AND mfqno LIKE \'XTC\%\'") or die $DBI::errstr;


it gives sql syntax error.but i could not find any error.

Is any idea please.

Regards
Rajiv


eWish
User

Feb 20, 2008, 7:39 PM


Views: 5082
Re: [rajiv_chennai] Help on mysql query

Have you already figured out your problem with your query?


If , not what errors are you getting from mysql? Also, what version are your running? Does your version allow for the use of subqueries?

--Kevin