Skip to content

[BUG]: Failing to execute a code that fetches 3000 records from the MySQL Database. #15655

Answered by amitc005
amitc005 asked this question in Q&A
Discussion options

You must be logged in to vote
    $product_list = [];
    foreach ($products as $product) {
      array_push($product_list, $product->product_id);
    }

    if (!isset($product_list)) {

        $product_attributes = ProductAttribute::query()
        ->columns([
          '\ProductAttribute.product_id',
          '\ProductAttribute.vorder',
          '\AttributeValue.attribute_id',
          '\AttributeValue.attribute_value_id',
          '\AttributeValue.attribute_value_name'
        ])
        ->innerJoin('AttributeValue', "\ProductAttribute.attribute_value_id = \AttributeValue.attribute_value_id")
        ->where('\ProductAttribute.product_id IN :ids:')
        ->bind(['ids' => $product_list])
        ->execute();…

Replies: 10 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Jeckerson
Comment options

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

@amitc005
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
Converted from issue

This discussion was converted from issue #15653 on September 09, 2021 20:37.