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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T20:55:14+00:00 2026-05-16T20:55:14+00:00

I have some complex code. Complex, but it was working. The I wanted to

  • 0

I have some complex code. Complex, but it was working.

The I wanted to add some new code, realized that something needed to become a function and then went on a refactoring rampage. Now my code no longer works.

So I did a bit of file compare, some code reading and debugging, and convinced myself that my changes hadn’t broken anything.

To test this theory, I put together an exceedingly simple test program:

<?php 
$connection = odbc_connect("Driver={MySQL ODBC 5.1 Driver};Server=localhost;Database=mysql;Option=3;", "root", "");
var_dump($connection);
echo '<br>';
  $result = @odbc_exec($connection, 'show version()');
  var_dump($result);
?>

which resulted in

resource(2) of type (odbc link) 
bool(false)

The strange thing is that the odbc_connect() succeeds, but the simplest MySql command I can think of fails.

Btw, I have tested at the command line & the MySql server is up & running (Xampp) and reports v 5.1.41.

Obviously I am overlooking something very basic, but what?

  • 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-16T20:55:15+00:00Added an answer on May 16, 2026 at 8:55 pm

    Maybe the odbc driver “wants” to tell you something about what is causing the error…

    $result = @odbc_exec($connection, 'show version()');
    if ( !$result ) {
      printf("error: %d %s", odbc_error($connection), odbc_errormsg($connection));
    }
    else {
      echo "ok";
    }
    

    see http://docs.php.net/odbc_error and http://docs.php.net/odbc_errormsg

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

Sidebar

Related Questions

I have some idea that it is due to some complex calculation, but i
see i have one complex code but i m stuck up some where so
I have code written in c, which contains some complex algorithms and I want
I have a MVVM application that contains multiple views with some complex IsReadOnly rules
I have a list of objects, that are pre-sorted based on some complex criteria
I have a stored procedure that goes something like this (pseudo code) storedprocedure param1,
I have some fundamental points/questions about OpenGL, not all involving code but concepts as
I'm working on an application in Java, that needs to do some complex logic
I have some relatively complex integration tests in my Python code. I simplified them
I have a problem with my JavaScript code. I'm starting with some more complex

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.