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