Solved

What do the parameters in the PDO function debugDumpParams mean?

Posted on 2017-02-23
1
43 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
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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…
This article discusses how to create an extensible mechanism for linked drop downs.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to dynamically set the form action using jQuery.

756 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