Return array data.
Syntax: array sybase_fetch_array(int result);
Return value: array
Function type: Database function
Content description
This function is used to split the query result result into an array variable. If result has no data, a false value is returned. This function can be said to be an enhanced function of sybase_fetch_row(). In addition to putting the returned column and numeric index into the array, you can also put the text index into the array.
Usage Example
This is an example submitted by joey@samaritan.com (22-Feb-1999)
Example 1:
$q = sybase_query("SELECT COUNT(DISTINCT OPPORTUNITY_ID) FROM M_OPP_INTERESTS WHERE INTEREST_ID = $i_id", $db);
while ($op_by_int = sybase_fetch_array($q)) {
while (list($k , $v) = each($op_by_int)) {
echo "\$op[$k] => $v\n";
}
?>
The return information is as follows
$op[0] => 2164
$op[computed] => 2164
Example 2:
$dbh = sybase_connect( 'SYBASE', '', '');
$q = sybase_query('SELECT * FROM p, a WHERE p.person_id= a.person_id');
var_dump(sybase_fetch_array($q));sybase_close($dbh);
?>
The above example would produce the following output (assuming the two tables only have each one column called "person_id"):
array(4) {
[0] =>
int(1)
["person_id"]=>
int(1)
[1]=>
int(1)
["person_id1"]= >
int(1)
}

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 English version
Recommended: Win version, supports code prompts!

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

Dreamweaver Mac version
Visual web development tools

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

SublimeText3 Mac version
God-level code editing software (SublimeText3)