I have a mistake in my preparation statement
$sqlst = $dbh->prepare('SELECT * FROM starter_trot WHERE UserId = 2345' ) or die "Couldn't prepare statement: " . $dbh->errstr;
$sqlst->execute($userid) or die "Couldn't execute statement: " . $sqlst->errstr;
my @data;
print"hai";
while (@data = $sqlst->fetchrow_array())
{
print "**";
}
A statement of completion and preparation for completion is optional.
[WHERE UserId = 2345] This is the part that it fails. When I run the query in db, it reconfigures the values. But when I run the request through scripts, it fails (but not compilation or execution problems), what is the problem .Is this in the preparation we have to give with? (Bind variables, not actual values?) ~ ~
source
share