Justtechjobs.com Find a programming school near you






Online Campus Both


php4-beta | 199912

Re: [PHP4BETA] 'resource' data type From: Danny Heijl (Danny.Heijl <email protected>)
Date: 12/23/99

Sorry, but you will have to write :

if (! ($cid = ifx_pconnect(...)) ) {
  ... error ...
}

in PHP4.

Or you could user my database/recordset/dbtable class (one of many I am
sure) for Informix : http://users.pandora.be/danny.heijl/rs.tgz

It hides the Informix syntax, is easy to use and behaves mostly like an ASP
recordset (with $rs->open(), $rs->close(), $rs->next(), $rs->first(),
$rs->previous(), $rs->last() etc...). It should be easy to plug in another
database server if the need presents itself, so that you don't have to
change your scripts.

Danny

---

----- Oorspronkelijk bericht ----- Van: "Mako Joe" Nieuwsgroepen: php4.beta Verzonden: woensdag 22 december 1999 23:22 Onderwerp: [PHP4BETA] 'resource' data type

It seems that there's a new data type in PHP4 called a "resource". The function ifx_connect() which returned an int in PHP3 returns a 'resource' in PHP4. If I recall correctly, there is also a function called is_resource(), but I can't test it at the moment. I've searched high and low for any documentation on this issue, but haven't found anything. If you know anything about this, or can direct me toward any documentation on this, please email me or respond to this post.

This happens to be an important issue for us, and may be as well for other people, as we have a lot of code that checks the return value of ifx_connect() with is_integer(). When we tried to migrate to PHP4, our scripts reported failure connecting to Informix. It took a lot of debugging to figure out what the problem was. I hope this is documented somewhere, because I'm sure other people will have similar problems.

Thank you very much

please remove 'DELETETHIS' from my email address when responding

-- PHP 4.0 Beta Mailing List <http://www.php.net/version4/> To unsubscribe, e-mail: php4beta-unsubscribe <email protected> For additional commands, e-mail: php4beta-help <email protected> To contact the list administrators, e-mail: php4beta-admin <email protected>