echo $II_SYSTEM
phpize
./configure --with-ingres
make
make install
LoadModule env_module modules/mod_env.so SetEnv II_SYSTEM votre-répertoire-II_SYSTEM SetEnv LD_LIBRARY_PATH votre-répertoire-II_SYSTEM/ingres/lib
<?php $link = ingres_connect(“mydb”, “username”, “password”); or die(“Could not connect”); echo “Connected successfully”; ingres_close($link); ?>
<?php
$link = ingres_connect(“mydb”, “username”, “password”);
if (ingres_errno($link) != 0) {
echo ingres_errno($link) . “ : “ . ingres_error($link) . “<BR/>\n”;
}
?>
<?php
$link = ingres_connect(“mydb”, “username”, “password”);
// Gives a list of the tables
$sql = “select * from iirelation order by relid asc”;
$rc = ingres_query($sql,$link);
// Do some error checking...
while ( $iirelation = ingres_fetch_object($link) ) {
echo $iirelation->relid “<BR/>\n”;
}
?>
<?php
$link = ingres_connect(“iidbdb”, “ingres”, “ingres”);
// Gives a list of the tables based on a parameter
$sql = “select * from iirelation where relowner = ? order by relid asc”;
$params[“owner1”] = (“usrname”);
$rc = ingres_query($sql,$link,$params);
// Do some error checking...
while ( $iirelation=ingres_fetch_object($link) ) {
echo $iirelation->relid “<BR/>\n”;
}
?>
<?php // Fetch the image to be inserted $handle = fopen (“usrname.png”,”r”); $login_image = stream_get_contents($handle); fclose($handle); // Set up the query $sql = “insert into login_images values (?,?)”; // Type the parameters being passed $types = “vB”; // varchar, BLOB // Set up the parameter values $params[“login”] = “usrname”; $params[“image”] = $login_image; // Execute $rc = ingres_query($sql,$link,$params,$types); ?>
Résultats pour Connexion à une base Ingres avec PHP
Résultats pour Connexion à une base Ingres avec PHP
Résultats pour Connexion à une base Ingres avec PHP
Résultats pour Connexion à une base Ingres avec PHP