We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have a FatalError in parsing SQL:
SELECT sql FROM sqlite_schema WHERE type ='table' AND tbl_name='table_hospitalises'; Fatal error: Uncaught Exception: Expect '(': ' ( chambre integer def...' FROM 'CREATE TABLE table_hospitalises ( chambre integer default 300 primary key , nom varchar(30) default '', prenom varchar(30) default '' , sex varchar(1) default 'M')' in C:\Users\manue\PhpstormProjects\untitled\vendor\maghead\sqlite-parser\src\BaseParser.php:70 Stack trace: #0 C:\Users\manue\PhpstormProjects\untitled\vendor\maghead\sqlite-parser\src\CreateTableParser.php(72): Maghead\SqliteParser\BaseParser->expect() #1 C:\Users\manue\PhpstormProjects\untitled\src\agenda.php(30): Maghead\SqliteParser\CreateTableParser->parse() #2 C:\Users\manue\PhpstormProjects\untitled\src\agenda.php(63): findInfoTable() #3 {main} thrown in C:\Users\manue\PhpstormProjects\untitled\vendor\maghead\sqlite-parser\src\BaseParser.php on line 70
My code:
global $db; $createTableParser = new CreateTableParser(); $sql = "SELECT sql FROM sqlite_schema WHERE type ='table' AND tbl_name='".$tablename."';"; echo $sql; $parser = new CreateTableParser; $stmt = $db->prepare($sql); $stmt->execute(); if($stmt!==false) { $results = $stmt->fetchAll(PDO::FETCH_BOTH); if($results!==false) { $table = $parser->parse($results[0]['sql']); } else { echo "DEBUG No Lines 1"; } } else echo "DEBUG No Lines 2"; var_dump($table);
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I have a FatalError in parsing SQL:
My code:
The text was updated successfully, but these errors were encountered: