Htaccess    html   Php    javascript   Asp   css    maths  Past Questions  Practice Tests Online

sybase unbuffered query function syntax tag tutorial 2013





Alert! Connect with 10,000 Chating Online. Join Now

Php sybase unbuffered query () function

Write your php code

 
<?php ?>

Php Result


Your code below



(PHP 4 >= 4.3.0, PHP 5)

sybase_unbuffered_query -- Send a Sybase query and do not block

Syntax

resource sybase_unbuffered_query ( string query, resource link_identifier [, bool store_result] )

Returns a positive Sybase result identifier on success, or FALSE on error.

Note: This function is only available using the CT library interface to Sybase, and not the DB library.

sybase_unbuffered_query() sends a query to the currently active database on the server that's associated with the specified link identifier. If the link identifier isn't specified, the last opened link is assumed. If no link is open, the function tries to establish a link as if sybase_connect() was called, and use it.

Unlike sybase_query(), sybase_unbuffered_query() reads only the first row of the result set. sybase_fetch_array() and similar function read more rows as needed. sybase_data_seek() reads up to the target row. The behavior may produce better performance for large result sets.

sybase_num_rows() will only return the correct number of rows if all result sets have been read. To Sybase, the number of rows is not known and is therefore computed by the client implementation.

Note: If you don't read all of the resultsets prior to executing the next query, PHP will raise a warning and cancel all of the pending results. To get rid of this, use sybase_free_result() which will cancel pending results of an unbuffered query.

The optional store_result can be FALSE to indicate the resultsets shouldn't be fetched into memory, thus minimizing memory usage which is particularly interesting with very large resultsets.

Example 1. sybase_unbuffered_query() example

<?php

$dbh
= sybase_connect('SYBASE', '', '');
$q = sybase_unbuffered_query('select firstname, lastname from huge_table', $dbh, false);
sybase_data_seek($q, 10000);
$i = 0;

while (
$row = sybase_fetch_row($q)) {
    echo
$row[0], ' ', $row[1], '<br />';
    if (
$i++ > 40000) {
        break;
    }
}

sybase_free_result($q);
sybase_close($dbh);

?>

See also sybase_query().

Php sybase unbuffered query Function syntax tag

sybase unbuffered query php code on this is provided for your study purpose, it will guide you to know how create and design a website using php. use it to practice and train your self online



Php sybase unbuffered query syntax tutorial

php tutorial guide and code design are for easy learning and programming. The code practice section provided at the top is for practising of this syntax. Use the code section up to practice your php programming online. Learning php is very easy, all you need is to use the examples on this site and practice them to perfect your skills.


Function index

Variables

Expressions

Operators

Control-Structures

Cookies

Array

Date & Time

Directory function

File

Image

Operators

Form data handling

Mathematics operators

Mail

Php Mysql

Network Functions

Strings

php tutorial guides,functions, classes, code examples and tags for creating simple dynamic site to mysql database driven sites
 
 
Htaccess    html   Php    javascript   Asp   css    maths  Past Questions  Practice Tests Online