RE: [PHP-DB] Informix + PHP any gotcha's to watch out for?
| From: | Mark Roedel | Date: | Tue, 23 Oct 2001 15:59:04 +0000 |
| Subject: | RE: [PHP-DB] Informix + PHP any gotcha's to watch out for? | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-13629@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: davemacgb [mailto:davemacgb@ntlworld.com]
> Sent: Monday, October 22, 2001 12:12 PM
> To: php-db@lists.php.net
> Subject: [PHP-DB] Informix + PHP any gotcha's to watch out for?
>
>
> I've only used MySQL via PHP until now, does anyone know of
> any gotchas that I should watch out for?
>
> The web site will hopefully run on Linux using Apache and PHP.
A few things that I've run into so far:
Make sure that your INFORMIXDIR environment variable is set. Apache
would segfault on my systems when I tried to use any of the informix
functions otherwise. I added a line to my apachectl script just to be
sure.
Ifx_connect() doesn't take quite the same parameters as mysql_connect().
The server you're connecting to is specified via either the
INFORMIXSERVER environment variable or one of the ifx default settings
in your php.ini. (In either case, it's a pointer to an entry in your
INFORMIXDIR/etc/sqlhosts, not a hostname.) Ifx_connect() also expects
the database name that you're connecting to.
Obviously, in light of the above, there is no ifx_select_db().
Ifx_num_rows() doesn't do the same thing as mysql_num_rows(). It counts
the number of rows that you've viewed from the result set, not the total
number of rows returned.
If you use mysql_fetch_array(), the equivalent Informix function is
ifx_fetch_row().
---
Mark Roedel | "Blessed is he who has learned to laugh
Systems Programmer | at himself, for he shall never cease
LeTourneau University | to be entertained."
Longview, Texas, USA | -- John Powell