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 8613105
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T04:47:26+00:00 2026-06-12T04:47:26+00:00

I’m attempting to pull data from a stored procedure using PDO, and I’m having

  • 0

I’m attempting to pull data from a stored procedure using PDO, and I’m having a really rough time nailing this down. I’ve searched around for the last few days and cannot seem to find a direct solution to my problem.

This is how I created the procedure:

DELIMITER $$
CREATE PROCEDURE sp_searchArticles(
   IN tagList VARCHAR(255), 
   IN lastArticle INT(10), 
   OUT  data INT(10))
BEGIN
CREATE TEMPORARY TABLE at_results (
id INTEGER(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
article_id INTEGER(10) NOT NULL,
datetime DATETIME NOT NULL,
common_tags INTEGER NOT NULL)
SELECT at.article_id, art.datetime, Count(at.article_id) AS common_tags
FROM article_tags AS at 
INNER JOIN articles AS art ON at.article_id = art.article_id
WHERE at.tag_id IN (tagList)
GROUP BY at.article_id
ORDER BY common_tags DESC, art.datetime DESC;

CREATE TEMPORARY TABLE at_article
SELECT id
FROM at_results
WHERE article_id = lastArticle;

SELECT article_id
INTO data
FROM at_results, at_article
WHERE at_results.id > at_article.id;

END $$
DELIMITER ;

Then I call the SP using PDO:

$sql = "CALL sp_searchArticles(:tag_list, :last_article, @data)";
$tag_sth = $this->db->prepare($sql);
$tag_sth->bindParam(':tag_list', $tag_list);
$tag_sth->bindParam(':last_article', $last_article);
$tag_sth->execute();
$data = $this->db->query("select @data")->fetch(PDO::FETCH_ASSOC);

But it returns “#1436 – Thread stack overrun:”

I have tried calling the stored procedure without using @data out variables, but I get HY000 errors. I did not originally want this call to be a stored procedure, but PDO doesn’t seem to like the face that I have multiple statements in a single execution. Also, I cannot seem to call the procedure correctly using static parameters through phpmyadmin. The sql statements work perfectly outside of the procedure, however.

I’m not the most proficient with PDO and mySQL, but I’ve read a whole lot about bugs within phpmyadmin, PDO, and PHP that pertain to stored procedures. Any help would be greatly appreciated.

  • 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-06-12T04:47:27+00:00Added an answer on June 12, 2026 at 4:47 am

    You may be utilizing more memory than MySQL is configured to allow you to use.

    See:

    MySQL error 1436: Thread stack overrun, with simple query

    Try changing your my.cnf file, if you have access to it.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
Does anyone know how can I replace this 2 symbol below from the string
I have a bunch of posts stored in text files formatted in yaml/textile (from
That's pretty much it. I'm using Nokogiri to scrape a web page what has
this is what i have right now Drawing an RSS feed into the php,
I am reading a book about Javascript and jQuery and using one of the

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.