> -----Original Message-----
> From: davemacgb [mailto:[EMAIL PROTECTED]] 
> Sent: Monday, October 22, 2001 12:12 PM
> To: [EMAIL PROTECTED]
> 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 

--
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