473,386 Members | 1,738 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

clues for a clueless guy

Dormilich
8,658 Expert Mod 8TB
Hi,

currently I'm stuck on finding the error of one of my functions. I try to read data out of MySQL using PDO. the SQL string is loaded as Prepared Statement (PDO->prepare()) and shall be executed using PDOStatement->execute().

I already know:
- there's no PDOException thrown
- there's no Error message
- the execute method returns false
- the parameters are correctly passed
(- all fields exist in the DB, they are either string types or int)

anyone an idea where to look or how to get more details about the error?

if I try it manually, it works…

Expand|Select|Wrap|Line Numbers
  1.             SELECT
  2.                 `comment`,
  3.                 `date`,
  4.                 `email`,
  5.                 `homepage`,
  6.                 `icq`,
  7.                 `id`,
  8.                 `ip`,
  9.                 `name`,
  10.                 `text`,
  11.                 `time`
  12.             FROM
  13.                 `myphpgb_entries`
  14.             WHERE
  15.                 `status` = ?
  16.             ORDER BY
  17.                 `id` DESC
  18.             LIMIT
  19.                 ?,?
Apr 21 '09 #1

✓ answered by Dormilich

it turned out, the last parameter (which was fetched from DB) had the wrong type. typecasting to int solved it.

…what a pain with those types

2 1283
Dormilich
8,658 Expert Mod 8TB
it turned out, the last parameter (which was fetched from DB) had the wrong type. typecasting to int solved it.

…what a pain with those types
Apr 21 '09 #2
Markus
6,050 Expert 4TB
@Dormilich
Amen, brother :P

It's strange that PDO didn't return an error..
Apr 21 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: red | last post by:
I have PHP Version 5.0.1 installed on my computer, and according to the pear manual pear is already installed. But how do I tell if it is installed ? for example, how do I get this line, which I...
0
by: dB | last post by:
I want to load an applet locally from the client's hard drive from an html/jsp page served by Tomcat on the local machine or a remote server. The motivation is that I need to print to the local...
2
by: Brian | last post by:
Taking cluelessness to a whole new level. < http://support.apollohosting.com/ > The beginning of the html is below. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> ...
4
by: | last post by:
Ok... well... I'm a noob as far as templates go, and casting and such... never bothered to learn much about this stuff... but now I've got a good reason to care, so i'm just wondering what's going...
6
by: Richard Bell | last post by:
I'm having difficulty with memory loss on an application that automates IE6 under XP (pro, fully up to date) using VB.Net. Every 30 minutes (triggered by the XP scheduler) the application visits a...
1
prn
by: prn | last post by:
Hi folks, I'm trying to add an email function to an existing Access application. I'm not irrevocably committed to any particular method, so I'm open to suggestions like "try <whatever>." However,...
1
by: Brock | last post by:
Thanks in advance... (you can see a screenshot of what my form looks like currently at http://www.juggernautical.com/DataGrid.jpg - the Datalist is super-imposed in 'design view' but the DataGrid...
7
alpnz
by: alpnz | last post by:
I am trying to access data on a mySQL server, but due to my age and alzheimer's I seem to be overlooking the obvious mistake here. Anyone care to spare a couple of minutes to help. <? $host =...
3
by: eggman89 | last post by:
Hi I'm doing my Fourth Year B.E. project under the internship of MindTree! Now they have only told us what to do , but haven't guide much! Now, we have been told to develop an search...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.