?
Solved

What do the parameters in the PDO function debugDumpParams mean?

Posted on 2017-02-23
1
Medium Priority
?
63 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 111

Accepted Solution

by:
Ray Paseur earned 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

762 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