I have table with colums id, name, email, message, phone, links and login.
Login can be null(empty).
Its my sql request:
$dbh = new PDO("mysql:host=$dbHost;dbname=$dbName", $dbUser, $dbPassword);
$sth = $dbh->query('SELECT * FROM `form` WHERE login NOT NULL ');
$sth->setFetchMode(PDO::FETCH_ASSOC);
whith this error
Call to a member function setFetchMode() on a non-object
Its error with “WHERE login NOT NULL”, i know. How me correctly make this request?
missing an
IS