Icon edb_paramcount

Returns the number of named parameters for a command.

Syntax
edb_paramcount(<CommandHandle>)

<CommandHandle> =

Handle of command returned by edb_prepare function

Returns
The number of parameters (INTEGER) if successful, or
FALSE if there are any errors

Usage
The edb_paramcount function returns the number of named parameters in a prepared command.

Examples
<?php

// The following script connects to an ElevateDB
// Server and database, prepares a parameterized
// SELECT statement, and then displays the parameter
// count using the edb_paramcount() function

$con = edb_connect("type=remote;charset=Ansi;address=127.0.0.1;"+
                   "uid=Administrator;pwd=EDBDefault;database=Test");
if (!$con)
  {
  die("Could not connect: " . edb_errmsg());
  }

$cmd = edb_prepare($con,"SELECT * FROM customer WHERE State=:State");
edb_setparam($cmd,"State","FL");

echo edb_paramcount($cmd);

edb_disconnect($con);
?>
Image