Connect PHP to an SQL database
Posted: Wed May 07, 2008 7:53 am
Hi everyone!
I have PHP page to display some statistics relating to my companies product performance in the marketplace. The powers that be have now decided that they want a second page that shows graphs to illustrate trends. One of the other guys in the office created an app that collects the data and then writes it to an SQL database.
So I'm thinking PHP connecting to a database, I've done that several times before with a MySQL DB and that was a piece of cake. Then I tried it. OMG! When ever I try to run a script that connects to the database it executes everything up to the database connection and then nothing. the page is displayed and anything below the connection simply doesn't get sent over. Based on that I'm guessing that there are several things I need to do before but i haven't a clue what those things are. With a deadline looming and a dead end found assistance would be greatly greatly appreciated!
cheers,
ben
PS The app, its database and the PHP pages are all on the same server. Also I'm viewing the database is in SQL Server 2005.
I have PHP page to display some statistics relating to my companies product performance in the marketplace. The powers that be have now decided that they want a second page that shows graphs to illustrate trends. One of the other guys in the office created an app that collects the data and then writes it to an SQL database.
So I'm thinking PHP connecting to a database, I've done that several times before with a MySQL DB and that was a piece of cake. Then I tried it. OMG! When ever I try to run a script that connects to the database it executes everything up to the database connection and then nothing. the page is displayed and anything below the connection simply doesn't get sent over. Based on that I'm guessing that there are several things I need to do before but i haven't a clue what those things are. With a deadline looming and a dead end found assistance would be greatly greatly appreciated!
cheers,
ben
PS The app, its database and the PHP pages are all on the same server. Also I'm viewing the database is in SQL Server 2005.