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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T02:37:27+00:00 2026-05-16T02:37:27+00:00

I am trying to run this simple SELECT query using PDO::MySQL, but it does

  • 0

I am trying to run this simple SELECT query using PDO::MySQL, but it does not return a value, as you can see from the dump $row returns false, which means there was an error.

The database connection works, as I’m writing to the database a few lines further down

Sql query is correct

Can someone see the bug in this code? If you can I’d really appreciate it, as this has been annoying me for hours


$statement = $DbConn->prepare("SELECT id FROM mineral_index WHERE typeID = :typeID AND systemID = :systemID");
$statement->bindParam('typeID', $this->typeID, PDO::PARAM_INT);
$statement->bindParam('systemID', $this->systemID, PDO::PARAM_INT);
$row = $statement->fetchObject();

echo "<p><pre>";
$statement->debugDumpParams();
var_dump($statement->errorInfo());
var_dump($this->typeID);
var_dump($this->systemID);
var_dump($row);
echo "</pre></p>"; 

dump:


SQL: [76] SELECT id FROM mineral_index WHERE typeID = :typeID AND systemID = :systemID
Params:  2
Key: Name: [7] :typeID
paramno=-1
name=[7] ":typeID"
is_param=1
param_type=1
Key: Name: [9] :systemID
paramno=-1
name=[9] ":systemID"
is_param=1
param_type=1
array(3) {
  [0]=>
  string(5) "00000"
  [1]=>
  NULL
  [2]=>
  NULL
}
int(35)
int(30000142)
bool(false)
  • 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-16T02:37:27+00:00Added an answer on May 16, 2026 at 2:37 am

    $statement->execute(); ?????

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

Sidebar

Related Questions

Hi I am trying to run this query in SQL but it is not
I am trying to run this query on http://dbpedia.org/sparql but I get an error
I am trying to run this simple query however it doesn't even parse saying
So what I'm trying to do is: Run this query: SELECT FW_ArtSrcLink FROM FW_ArtSrc
I am trying to run this dreadfully simple command in Bash java -cp nasa-top-secret.jar
I am trying to run this seemingly simple piece of code which is repeated
I'm trying to run this code but this error appear: Uncaught TypeError: string is
I am trying to run this tutorial i did not implement the validation part
I'm trying to run a simple insert query to a database. I have it
I'm having trouble getting this simple query to execute. I'm using nameless parametized queries

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.