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
In reply to Re: Re: Message storing problem.
by salvadors
in thread Message storing problem.
by Martin A
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |