Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

Versions available for this page: CUBRID 8.4.0 |  CUBRID 8.4.1 | 



cubrid_close_prepare, cubrid_close_request

Description

The cubrid_close_prepare and cubrid_close_request functions close the request handle given to the req_identifier parameter and release the memory area related to the handle.

Syntax

int cubrid_close_prepare (resource $req_identifier)

int cubrid_close_request (resource $req_identifier)

  • req_identifier : Request identifier
Return Value
  • Success : TRUE
  • Failure : FALSE
Example

<?php

$conn = cubrid_connect("localhost", 33000, "demodb");

$req = cubrid_prepare ($conn, "SELECT * FROM olympic WHERE host_year=?");

 

$host_year = 2004;

cubrid_bind($req, 1, $host_year, "number");

cubrid_execute($req);

 

printf("%-9s %-11s %-9s %-12s %-12s %-15s %-15s ",

    "host_year", "host_nation", "host_city", "opening_date",

    "closing_date", "mascot", "slogan");

 

while ($row = cubrid_fetch_assoc($req)) {

    printf("%-9s %-11s %-9s %-12s %-12s %-15s %-15s ",

        $row["host_year"], $row["host_nation"], $row["host_city"],

        $row["opening_date"], $row["closing_date"], $row["mascot"], $row["slogan"]);

}

 

cubrid_close_request($req);

 

cubrid_disconnect($conn);

?>

 

The above example will output:

 

host_year host_nation host_city opening_date closing_date mascot          slogan

2004      Greece      Athens    2004-8-13    2004-8-29    Athena  Phevos  Welcome Home

See Also