Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6207503
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T05:38:29+00:00 2026-05-24T05:38:29+00:00

Ive been running some queries using PHP’s PDO library. It seems that when i

  • 0

Ive been running some queries using PHP’s PDO library. It seems that when i use:

<?php
    $smtp->execute();
    $result = stmt->fecthArray();
?>

It unsets the array inside PDO. I know this because when i call that very same line again, it returns an empty array. Why does it do this? Is this normal behavior?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T05:38:30+00:00Added an answer on May 24, 2026 at 5:38 am

    When building the resulting array, fetchAll() removes all the results from the result set. Instead of calling it again, re-use the array you retrieved in the first time.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Ive been doing some research today on when an how to use the using
I've got a Rails app that's been running live for some time, and I'm
Ive been using MSVC2010 for some time now combined with Python Tools 1.0 I'm
i've been running some experiments of my own with Spring Roo and it seems
I've been running into some problems concerning a SqlTransaction I'm using in my code.
I've just been running some simple debug tests against arrays, and noticed that when
I got a PHP web service that had been running great for a long
I'm new to Delphi, and I've been running some tests to see what object
I've been refactoring some code running on a simple LAMP box on my network.
I've been having some trouble with vs2008 SP1 running in debug mode when I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.