Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cold Fusion to PHP 2

Status
Not open for further replies.

OldWilly

Programmer
Mar 1, 2002
66
I'm converting some CF sites to PHP. While being fairly well-versed in Cold Fusion, I am enirely new to PHP.
I've read several tutorials, but have failed to find
equivalents of things I do in CF. For instance, I'm coding a form which has several drop-down lists which are filled
with the results of several tables. I'm trying to find a code example showing how to address different queries to the DB. I anticipate running into more problems of this nature and I'm looking for a good resoource.

Can anyone point me to a site showing more complex code examples? Or recommend any books? Thx in advance.
 
I don't know much about CF other than the tek-tips site is written in it !
I'm assuming that you would write your site in CF code and talk to whatever database backend that was appropriate. In PHP world it's very often MySQL, although there is an ODBC interface and native ones for the likes of Oracle, SQLserver, Informix, Ingres etc.
The programming model is similar for all the databases to do what you want to do e.g.
Code:
connect to the db;
issue your query;
for each row in the result set
    <option = $rowvalue;
next
close connection;
I can't remember the syntax for a drop down but I guess that's that least of your issues !
Books about PHP are an interesting topic and a few threads have been started here.
I think wrox books are usually ok, if your an old hand at coding something like the dummies series might be what you need to get that kick start.
There a few advanced ones like core php which covers database and a load of libraries.
I've also got which goes into depth about loads of PHP issues such as how the zend engine works and how to write extentions.
have fun !
 
the best examples can be found in the php manual. it's search facility is fantastic too.

and don't forget that you can post freely in this forum. I'm sure we'd all appreciate an understanding of some of the stumbling blocks one comes across when porting from CF to php.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top