Suljettu

SQL Query not working in perl

Hi,

I have coded this query

$sth = $dbh->prepare("SELECT id, userid, retailer, amount, date FROM accounts WHERE retailer=Referral% cd=? AND status=? ORDER by date DESC LIMIT 1000");

However this bit is not working ' retailer=Referral%' what have I done wrong? This is all I need to know.

I wanted it to bring up everything starting with Referral

Thanks.

Matt

Taidot: Perl

Näytä lisää: working from, up working, n query, no working, perl prepare sql date, working perl, best sql query, sql query working, sql_query perl, sql query jobs, SQL Query, retailer, desc, dbh, referral wanted, sql select select, sql select order, sql select, query query, userid, perl date, not, need sql query, perl sql, limit order

Tietoa työnantajasta:
( 115 arvostelua ) Newark, United Kingdom

Projektin tunnus: #455340

8 freelancers are bidding on average $31 for this job

dims

Ready to fix query right now

30 $ USD 0 päivässä
(115 arvostelua)
6.1
TakeReal

I can rewrite your query and make sure: it working properly.

30 $ USD 1 päivässä
(83 arvostelua)
5.2
egg

i can do this

30 $ USD 1 päivässä
(38 arvostelua)
4.4
fuzzoid

Will be done in no time

30 $ USD 0 päivässä
(4 arvostelua)
3.3
dhoss

Hi there, Please check your PM for details

35 $ USD 1 päivässä
(1 arvostelu)
2.9
dreamci

check pm please

30 $ USD 0 päivässä
(7 arvostelua)
2.9
robinbowes

Please see PM.

30 $ USD 0 päivässä
(2 arvostelua)
1.7
salasbg

Try this out: $sth = $dbh->prepare("SELECT id, userid, retailer, amount, date FROM accounts WHERE retailer='Referral%' cd=? AND status=? ORDER by date DESC LIMIT 1000"); or: $sth = $dbh->prepare("SELECT id, userid Lisää

30 $ USD 0 päivässä
(0 arvostelua)
0.0