Quote:
Originally Posted by hamiltonsteele
T
$stmnt=$conn->query('select * from test01')
$stmnt->rowcount()
$stmnt->fetch(PDO::FETCH_ASSOC)
$conn = null;
I'm getting this :
Parse error: syntax error, unexpected '$stmnt' (T_VARIABLE) in C:\wamp64\www\index2.php on line 20
|
You apparently did not actually read what I wrote. You used tehe statements but ignored the usage.
The error is because you do not have semi-colons at the end of your statements but once you fix that the code still won't do shit.
You need to use the rowcount() inside an if for it to make sense.
You also need to attempt to understand what you are writing.
.