View Single Post
Old 04-15-2022, 01:08 PM  
sarettah
see you later, I'm gone
 
Industry Role:
Join Date: Oct 2002
Posts: 14,091
Quote:
Originally Posted by hamiltonsteele View Post
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.

.
__________________
All cookies cleared!
sarettah is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote