trying to write an sql query in php [closed]
We don’t allow questions seeking recommendat开发者_运维问答ions for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 12 hours ago.
Improve this questionam trying to write a simple query to fetch data from a database either using select statement or any available method to achieve that
this is what i tried
// method declaration
public function displayVar()
{
$db = new sqliteAdapter('C:\Server\privatefolder\MVC\Engine\db\userinfo.db');
SELECT * from userinfo;
}
this is the error i get
Parse error: syntax error, unexpected identifier "userinfo" in C:\Server\privatefolder\MVC\models\modelclass.php on line 14
i was instructed to use select statement but it isn't working (or maybe am doing it wrong) all i just want to do is write a query to fetch data from database. you can help me out with various methods/ways available to do that
精彩评论