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

  • SEARCH
  • Home
  • 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 522831
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T08:23:41+00:00 2026-05-13T08:23:41+00:00

I have two completely separate queries that were transferred over to procedures. When they

  • 0

I have two completely separate queries that were transferred over to procedures. When they were ad-hoc queries, they ran great but now that I have stored them, things have gotten strange.

PHP calls a class method which returns the values of one of the procs. The second method is then called and fails. When I run the run the proc that PHP fails to give me, directly from the command line, it gives me the results just fine. This is certainly strange.

Can someone tell me if I’m missing something? I’d be happy to post some code but in the interest of time, I figured I would ask and see if this is a common problem first.


This is the function that connects;

function connect()
{
    $conn = mysql_connect($host, $user, $pass);
    if(!$conn){
        echo 'Error: cannot connect';
    }else{
        $selectDB();
    }
}

This is the proc that is failing:

BEGIN
SELECT name FROM source ORDER BY name ASC;
END

This is the first proc that returns the results.

BEGIN
SELECT cpw, cpw_id FROM cpw ORDER BY cpw ASC;
END
  • 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-13T08:23:42+00:00Added an answer on May 13, 2026 at 8:23 am

    Seeing the code will allow for more specific help, but have you checked already for variable name conflicts in the procs that could be overwriting your connection credentials?

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

Sidebar

Related Questions

I have code that is completely parallel, no dependencies, so using pthreads was a
You have regular users that use your website/services, they can login to mainsite1, then
I've got an app that I've developed for the iPhone, but now want to
I have two closely related sites, a main site and a mobile site, hosted
I am having multiple Services in my application.i have a datacontract that i need
At work we have a number of projects which need to share some common
Hi all! I wonder if there is a generally preferred implementation paradigm to respect
We are evaluating the use of Logback in a multi-server Weblogic environment. On one
I'm working my way through Head First C#, and I'm a bit confused on
Alright, this is a sort of dual-purpose question. The main thing I hope to

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.