in reply to Re: Message storing problem.
in thread Message storing problem.
my $UID = getUserIdSomehow(); $dbh->prepare("SELECT * FROM message WHERE for_user=$UID ORDER BY tstamp");
Surely you don't prepare the query with a variable in it? You should be using placeholders:
which then gets executed with $sth->execute($UID)my $UID = getUserIdSomehow(); my $sth = $dbh->prepare("SELECT * FROM message WHERE for_user=? ORDER BY tstamp");
Tony
|
|---|