on 12/30/02 9:51 AM, midheart at [EMAIL PROTECTED] appended the
following bits to my mbox:

> Well, I didn't define my question well last time.
> My question is that when I try to reload a php page, I would sometimes get a
> warning mesg, Warning: 1 is not a Sybase result index ...., or I would be
> lucky to get the correct output. Even if the first time to open the php
> page, it would be warning mesgs everywhere.
> My database is Sybase, and I think that my php coding wouln't get wrong!
> Because I could get the correct output, just  after some reloading the page.
> Does anybody have any experience as this one?
> HOW do you solve it?
> Maybe I forget to initialize something, or to clean something. Anyone knows?

I've seen something a bit similar using MySQL.  I was using persistent
connections to a database in several scripts.  In one of the scripts, I
hadn't performed the database selection command (MySQL_select_db).    That
page would work *if* it was served by the web server process that already
had a connection to the database with the correct DB selected, but would pop
up "warning... Not a result..." if not.  Adding the select database command
in the script solved it, of course.

Check phpinfo() to see if sybase persistent connections are allowed, and if
you aren't using the default database, make sure you are calling the
sybase_select_db() command before the queries.




Paul Burney

    while ($self != "asleep") {

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to