Solved

What do the parameters in the PDO function debugDumpParams mean?

Posted on 2017-02-23
1
50 Views
Last Modified: 2017-02-24
When I run that functionality, I get this:

function name:reggie_id

SQL: [194] Select registrationeventid from tblregistrationeventtoscreening where screeningperiodid in (select screeningperiodid from tblscreeningsubperiod where screeningsubperiodid =:screeningsubperiodid)
Params:  1
Key: Name: [21] :screeningsubperiodid
paramno=0
name=[21] ":screeningsubperiodid"
is_param=1
param_type=1

What does "paramno" mean? What does "is_param" mean and, while I can desipher "param_type" easy enough, is there a key somewhere that gives you an idea as to what those numerical values mean?

Thanks!
0
Comment
Question by:brucegust
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 110

Accepted Solution

by:
Ray Paseur earned 500 total points
ID: 42021691
It's pretty well explained on the man page.  

As I understand it "paramno" is the positional offset (from zero) of the param in the query, however it will be -1 if this is not supported by the query type or the PDO extension in use.  The is_param=1 seems superfluous because why list anything that is not a param (d'oh)?

Param_type matches up with the PDO constants like PDO::PARAM_INT, PDO::PARAM_STR, etc.  See here:
http://php.net/manual/en/pdo.constants.php

Just a guess but the 21 in name=[21] ":screeningsubperiodid" is a character count

It's probably better implemented in this comment:
http://php.net/manual/en/pdostatement.debugdumpparams.php#113400

This is the sort of method that I alluded to when I suggested that you consider extending the PDO class.  It looks like it could be very helpful.

HTH, ~Ray
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article discusses four methods for overlaying images in a container on a web page
This article discusses how to create an extensible mechanism for linked drop downs.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to count occurrences of each item in an array.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question