#3316 Manual page for cubrid_close_request() should be edited

open
nobody
None
5
2013-06-05
2013-06-05
Jira Trac
No

The example listed here:
http://www.php.net/manual/en/function.cubrid-close-request.php

is not a very ok one. The server mentioned is unusable and therefore the user cannot run the script to check the output. I think for all examples demodb should be used since most users will know about it or have it installed when installing cubrid.

Secondly, there is a typo in cubrid_close_requst($req); where it should be request and not requst.

Below is an example I wrote. If you notice any problems, let me know.
{code}
?php
$con = cubrid_connect (localhost, 33000, demodb);
if ($con) {
echo connected successfully\n;
$req = cubrid_execute ( $con, select * from athlete limit 0,10,
CUBRID_INCLUDE_OID | CUBRID_ASYNC);
if ($req) {
while ( list ($name, $gender) = cubrid_fetch ($req) ){
echo $name., ;
echo $gender.\n;
}
cubrid_close_request($req); // or you can use cubrid_close_prepare($req)
}
cubrid_disconnect($con);
}
?
{code}

Discussion

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks