When I insert some data into table, select through php ifx_ functions don't
return these newly inserted values. Can anyone tell me why this happens?
In dbaccess I can select all values.

I use apache 1.3.20, php 4.0.5 and IDS 2000 on SunOS 5.7.

This problem bugs me for some time now and I'm really pissed.

I inserted data through a stored procedure and I'm trying to select data
like this:

$conn_id=ifx_connect ($database, $username, $password);

if (! $conn_id) {
        echo "<b>Ne mogu se spojiti na bazu</b>";

$select = pripremi_upit($ime, $prezime, $zavod, $telefon, $email, $izbor);

echo "<br>" . $select . "<br>";

$rid = ifx_prepare ($select, $conn_id);

if (! $rid) {
        printf("Do&#353lo je do pogre&#353ke u radu\n");

$rowcount = ifx_affected_rows($rid);

if (! ifx_do ($rid)) {
        printf("Ne mogu izvr&#353iti upit nad bazom podataka\n");

$rowcount = ifx_num_rows($rid);

$row = ifx_fetch_row ($rid, "NEXT");

echo "Pretra&#382ivanje zavr&#353eno.<br>Pronadjeno je <b>" . $rowcount .
"</b> zapis(a)<br><br>";

echo "<h1>Rezultati pretra&#382ivanja:</h1>";
while (is_array($row)) {
        for (reset($row); $fieldname = key($row); next($row)) {
        $rez = array_values($row);
        echo "<font > <font face=\"Arial, Helvetica, sans-serif\">";
        echo "<table width=\"75%\" border=\"2\">";
        echo "<tr>";
        echo "<b>Prezime: </b>" . $rez[2] . "<br>";
        echo "<b>Ime: </b>" . $rez[1] . "<br>";
        echo "<b>Tel. broj interni: </b>" . $rez[3] . " (alt.:" . $rez[7] .
")" . "<br>";
        echo "<b>Tel. broj vanjski: </b>" . $rez[8] . "<br>";
        echo "<b>Tel. broj ku&#263ni: </b>" . $rez[9] . "<br>";
        echo "<b>Zavod: </b>" . $rez[4] . "<br>";
        echo "<b>Krilo: </b>" . $rez[5] . "<br>";
        echo "<b>Soba: </b>" . $rez[6] . "<br>";
        echo "<b>e-mail: </b> <a href=\"mailto:"; . $rez[10] . "\">" .
$rez[10] . "</a>" . "<br>";
        echo "</tr>";
        echo "</table>";
        echo "<br><hr>";
        $row = ifx_fetch_row ($rid, "NEXT");

echo "Pretra&#382ivanje zavr&#353eno.<br>Pronadjeno je <b>" . $rowcount .
"</b> zapis(a)<br><br>";

ifx_free_result ($rid);
ifx_close ($conn_id);

Thanks for help!

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to