php - Syntax error or access violant 1064 -


i don't see problem in code, there solution in giving php access database?

<?php       try {          $db = new pdo('mysql:host=xxx;dbname=xxx', 'xxx', 'xxx');          $db->setattribute(pdo::attr_errmode, pdo::errmode_exception);      } catch (pdoexception $e) {          echo $e->getmessage();          die();      }            $query = $db->query('select * users');      $r = $query->fetch();      echo 'pre', print_r($r), '</pre>';  ?>

sqlstate[42000]: syntax error or access violation: 1064 have error in sql syntax; check manual corresponds mariadb server version right syntax use near '0' @ line 1 –


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -