Compare commits
2 Commits
714864cdbc
...
f4663a60e1
Author | SHA1 | Date | |
---|---|---|---|
f4663a60e1 | |||
d8c07e28a0 |
@ -33,7 +33,7 @@ $connectionOptions = array(
|
|||||||
ConnectionOptions::OPTION_CREATE => true,
|
ConnectionOptions::OPTION_CREATE => true,
|
||||||
// optionally create new collections when inserting documents
|
// optionally create new collections when inserting documents
|
||||||
ConnectionOptions::OPTION_UPDATE_POLICY => UpdatePolicy::LAST,
|
ConnectionOptions::OPTION_UPDATE_POLICY => UpdatePolicy::LAST,
|
||||||
ConnectionOptions::OPTION_DATABASE => 'database',
|
ConnectionOptions::OPTION_DATABASE => $database,
|
||||||
);
|
);
|
||||||
|
|
||||||
// open connection
|
// open connection
|
||||||
|
@ -43,16 +43,17 @@ if (isset($_GET['pwd'])){
|
|||||||
if ($_GET['pwd'] == 123){
|
if ($_GET['pwd'] == 123){
|
||||||
$statement = new Statement($connection, [
|
$statement = new Statement($connection, [
|
||||||
'query' => 'for user in users
|
'query' => 'for user in users
|
||||||
let name = (
|
let name = (
|
||||||
for v, e, p in 1..1 outbound user answered
|
for v, e, p in 1..1 outbound user answered
|
||||||
filter v._key==\'29551\'
|
filter v._key==\'29551\'
|
||||||
return e.answer
|
return e.answer
|
||||||
)
|
)
|
||||||
let answers = (
|
let answers = (
|
||||||
for v, e, p in 1..1 outbound user answered
|
for v, e, p in 1..1 outbound user answered
|
||||||
return {qkey: v._key, question: v.question, answer: e.answer}
|
filter v.type==\'personal\' or v.type==\'aux\'
|
||||||
)
|
return {qkey: v._key, question: v.question, answer: e.answer}
|
||||||
return {user: user._key, name: name[0], answers: answers}',
|
)
|
||||||
|
return {user: user._key, name: name[0], answers: answers}',
|
||||||
'count' => true,
|
'count' => true,
|
||||||
'batchSize' => 1000,
|
'batchSize' => 1000,
|
||||||
'bindVars' => null,
|
'bindVars' => null,
|
||||||
|
Loading…
Reference in New Issue
Block a user