Btw, i'm making a register page for a server and i'm experiencing a problem with a query...
I'm using php oop and pdo:
Code:
$stmt = $conn->prepare("SELECT count(*) FROM dbo.Account WHERE Name = :name");
$stmt->bindParam(":name", $username);
$stmt->execute();
if($stmt->rowCount()) $error = "This username already exists";
When i put:
Code:
SELECT * FROM dbo.Account WHERE Name="test"
I hope to get helped as soon as possible, thank you in advance!
EDIT:
Figured out by myself, in the query i cannot use RowCount with SELECT statement, and about navicat i was typing "test" instead of 'test'






