Skip to content

Extract query setFile() without storing the file on local storage #1066

Answered by thomascorthals
gruenmap asked this question in Q&A
Discussion options

You must be logged in to vote

I tested it and this does work in PHP >= 8.1.0. It generates warnings with Solarium 6.3.1 though. I've opened PR #1083 to have this fixed in the next release. The PR also includes a full working example.

$db = new PDO(...);

$select = $db->prepare("SELECT content FROM table WHERE id = ?");
$select->execute($id);
$select->bindColumn(1, $content, PDO::PARAM_LOB);
$select->fetch(PDO::FETCH_BOUND);

$query->setFile($content);

$client->extract($query);

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
3 replies
@thomascorthals
Comment options

@thomascorthals
Comment options

@thomascorthals
Comment options

Comment options

You must be logged in to vote
2 replies
@thomascorthals
Comment options

Answer selected by gruenmap
@thomascorthals
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants