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

ovrimos result all function syntax tag tutorial 2013 Donate at flattr Flattr this





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

Php ovrimos result all () function

Write your php code

 
<?php ?>

Php Result


Your code below



(PHP 4 >= 4.0.3, PHP 5)

ovrimos_result_all --  Prints the whole result set as an HTML table

Syntax

int ovrimos_result_all ( int result_id [, string format] )

ovrimos_result_all() prints the whole result set as an HTML table. Returns the number of rows in the generated table.

Example 1. Prepare a statement, execute, and view the result

<?php
$conn
= ovrimos_connect("db_host", "8001", "admin", "password");
if (
$conn != 0) {
    echo
"Connection ok!";
    
$res = ovrimos_prepare($conn, "select table_id, table_name
                                    from sys.tables where table_id = 7"
);
    if (
$res != 0) {
        echo
"Prepare ok!";
        if (
ovrimos_execute($res, array(3))) {
            echo
"Execute ok!\n";
            
ovrimos_result_all($res);
        } else {
            echo
"Execute not ok!";
        }
        
ovrimos_free_result($res);
    } else {
        echo
"Prepare not ok!\n";
    }
    
ovrimos_close($conn);
}
?>
This will execute an SQL statement and print the result in an HTML table.

Example 2. ovrimos_result_all() with meta-information

<?php
$conn
= ovrimos_connect("db_host", "8001", "admin", "password");
if (
$conn != 0) {
    echo
"Connection ok!";
    
$res = ovrimos_exec($conn, "select table_id, table_name
                                 from sys.tables where table_id = 1"
);
    if (
$res != 0) {
        echo
"Statement ok! cursor=" . ovrimos_cursor($res) . "\n";
        
$colnb = ovrimos_num_fields($res);
        echo
"Output columns=" . $colnb . "\n";
        for (
$i=1; $i <= $colnb; $i++) {
            
$name = ovrimos_field_name($res, $i);
            
$type = ovrimos_field_type($res, $i);
            
$len = ovrimos_field_len($res, $i);  
            echo
"Column " . $i . " name=" . $name . " type=" . $type . " len=" . $len . "\n";
        }
        
ovrimos_result_all($res);
        
ovrimos_free_result($res);
    }
    
ovrimos_close($conn);
}
?>

Example 3. ovrimos_result_all() example

<?php
$conn
= ovrimos_connect("db_host", "8001", "admin", "password");
if (
$conn != 0) {
    echo
"Connection ok!";
    
$res = ovrimos_exec($conn, "update test set i=5");
    if (
$res != 0) {
        echo
"Statement ok!";
        echo
ovrimos_num_rows($res)." rows affected\n";
        
ovrimos_free_result($res);
    }
    
ovrimos_close($conn);
}
?>

Php ovrimos result all Function syntax tag

ovrimos result all 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 ovrimos result all 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