Solved

What do the parameters in the PDO function debugDumpParams mean?

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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
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 …

688 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