php - IS NOT NULL giving null values -


i have following php code using pdo. want rows empty values not appear in results. how achieve this, , doing wrong below?

<?php require_once 'dbconfig.php';  try {     $conn = new pdo("mysql:host=$host;dbname=$dbname", $username, $password);     echo "connected $dbname @ $host successfully.";     $sql = 'select *              as_questions              answer not null';      $q = $conn->query($sql);     $q->setfetchmode(pdo::fetch_assoc);  } catch (pdoexception $pe) {     die("could not connect database $dbname :" . $pe->getmessage()); } 

as above suggested 2 persons (fred -ii , alex anderi) please change query below:-

$sql = "select * as_questions answer !=''"; 

Comments

Popular posts from this blog

routing - AngularJS State management ->load multiple states in one page -

python - GRASS parser() error -

post - imageshack API cURL -