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

c++ - llvm function pass ReplaceInstWithInst malloc -

Cross-Compiling Linux Kernel for Raspberry Pi - ${CCPREFIX}gcc -v does not work -

java.lang.NoClassDefFoundError When Creating New Android Project -