My post below works but is *not* the correct way. It only works because of default behavior. I'll re-post my understanding of what is "correct" soon.
Fonctions Ingres II
Sommaire
- ingres_autocommit — Active ou désactive le mode autocommit
- ingres_close — Ferme une connexion à un serveur Ingres
- ingres_commit — Valide une transaction
- ingres_connect — Ouvre une connexion sur un serveur Ingres
- ingres_cursor — Récupère le nom du curseur pour une ressource donnée
- ingres_errno — Récupère le dernier numéro d'erreur d'ingres généré
- ingres_error — Récupère un message d'erreur significatif pour la dernière erreur générée
- ingres_errsqlstate — Récupère le dernier code SQLSTATE généré
- ingres_fetch_array — Récupère une ligne de résultat Ingres dans un tableau
- ingres_fetch_object — Récupère une ligne de résultat dans un objet
- ingres_fetch_row — Récupère une ligne de résultat dans un tableau énuméré
- ingres_field_length — Retourne la taille d'un champ
- ingres_field_name — Retourne le nom d'un champ dans le résultat d'une requête
- ingres_field_nullable — Teste si un champ est annulable
- ingres_field_precision — Retourne la précision d'un champ
- ingres_field_scale — Retourne l'échelle d'un champ
- ingres_field_type — Retourne le type d'un champ dans le résultat d'une requête
- ingres_num_fields — Retourne le nombre de champs renvoyés par la dernière requête
- ingres_num_rows — Retourne le nombre de lignes affectées ou renvoyées par la dernière requête
- ingres_pconnect — Ouvre une connexion persistante à un serveur Ingres
- ingres_query — Envoie une requête SQL à un serveur Ingres II
- ingres_rollback — Annule une transaction Ingres
Fonctions Ingres II
corysbrain-ondrugs at yahoo dot com
07-Jul-2007 06:04
07-Jul-2007 06:04
corysbrain-ondrugs at yahoo dot com
14-Feb-2007 03:57
14-Feb-2007 03:57
On the three versions of Linux/Ingres I've worked on, I've always had to modify the following line in the example above:
while ($iirelation = ingres_fetch_object($link)) {
to:
while ($iirelation = ingres_fetch_object()) {
If not, PHP will return "Undefined property" notices.
However, it's my understanding that the following is the proper way to access the database (it works as expected):
<?php
// Connecting, selecting database
$link = ingres_connect('database', 'user', 'password')
or die('Could not connect: ' . ingres_error($link));
echo 'Connected successfully';
// Select from a table that exists in all Ingres databases
$query = 'SELECT * FROM iirelation';
$rs = ingres_query($query,$link) or die('Query failed: ' .
ingres_error($link));
// Print results in HTML
// relid - table name
// relowner - table owner
echo "<table>\n";
while ($iirelation = ingres_fetch_object($rs)) {
echo "\t<tr>\n";
echo "\t\t<td>" . $iirelation->relid . "</td>\n";
echo "\t\t<td>" . $iirelation->relowner . "</td>\n";
echo "\t</tr>\n";
}
echo "</table>\n";
// Commit transaction
ingres_commit($link);
// Closing connection
ingres_close($link);
?>
mail at hannes-reinecke dot de
12-Dec-2002 12:09
12-Dec-2002 12:09
If you try to use the 'Embedded Ingres' as it is delivered with certain CA products (e.g. TNG UHD), the referenced library '-lingres' is not available. You need to add '-lq -lframe' instead.
burckhardtNOSPAM at SNIPITOFFgsf dot de
23-Jan-2002 07:07
23-Jan-2002 07:07
Hi,
I am currently migrating from MySQL to Ingres. Generally, almost ALL INGRES-functions that use arrays start with counter=1, NOT counter=0. Also, whereas MySQL-functions use $result as an argument, INGRES-functions use $connection instead.
Florian
