Copy link to clipboard
Copied
Hi all, as a php newbie I just need one small answer yes or no.
My company has a number of websites considered catalogues in our db, all these websites run on the ONE mssql database
When a website is accessed the global ASA sets a session variable called catid unique for that site.
When a user searches for products in say our toy website, it queries the products stored proceedure with the unique catid and brings back toys, when someone visits say our book website, the different catid queries the products stored proceedure and brings back all the books.
Doing it this way allowed me to maintain only one database, yet have as many websites as I liked using the same structure of calling a stored proceedures making it dead easy to create new websites, eg toy websites, sporting goods etc for all the products my company imports.
Now that classic ASP is a dead end, I'm moving over to PHP and MySql.
PHP has no global ASA I'm currently aware of, so the simple question is . . .
Can I achieve the same concept in PHP MySQL without tearing my hair out, it was relatively easy with Dreamwever server behaviors for mssql but dreameaver does not support the same behavor (as far as I can tell) for MySql
Appreciate all comments
- remy -
Welcome over to the "light side" The demise of ASP has been a long drawn out death. I absolutely amazes me how fast the web can change and move forward, yet at the same time some elements of the web can take forever to die... (traditional ASP, and IE6 as examples) But time marches on.
One thing I really wish PHP had was a "global" file that it would call on every page request, ASP had Global.asa and ColdFusion has Application.cfm or Application.cfc. These files are invaluable in easily setting
...Copy link to clipboard
Copied
Welcome over to the "light side" The demise of ASP has been a long drawn out death. I absolutely amazes me how fast the web can change and move forward, yet at the same time some elements of the web can take forever to die... (traditional ASP, and IE6 as examples) But time marches on.
One thing I really wish PHP had was a "global" file that it would call on every page request, ASP had Global.asa and ColdFusion has Application.cfm or Application.cfc. These files are invaluable in easily setting variables that are readily available to the entire application, but alas no such wonder exists in PHP at this tile. So you are forced to create your own Global settings file and then remember to include it at the top of every page. I sure wish PHP would address this. It's one of the reasons I favor CF over PHP.
--
Lawrence Cramer - *Adobe Community Professional*
http://www.Cartweaver.com
Shopping Cart for Adobe Dreamweaver
available in PHP, ColdFusion, and ASP
Stay updated - http://blog.cartweaver.com
Copy link to clipboard
Copied
Thanks Lawrence,
I've been doing that via a template page but I wasn't quite sure if there was a better method.
Thanks for your help
Cheers
Remy
Copy link to clipboard
Copied
Many of the larger frameworks and CMS systems (Zend, Joomla!, WordPress, etc.) route all requests through the main "bootstrap" index.php file, which then acts like a global file where any of the shared variables, constants and includes can be declared. I usually end up doing the same these days for my own systems.
Copy link to clipboard
Copied
Then there's always ASP.NET. But as we know, DW dropped support for that, and it made a difficult choice easy when it came to deciding where to go after classic ASP. And it's not just DW support that's important to me, but developers of third-party DW extensions which are also finally letting go of ASP. Just my 2cents.
This topic bookmarked for when I come up against a similar situation.
Copy link to clipboard
Copied
Lawrence_Cramer wrote:
One thing I really wish PHP had was a "global" file that it would call on every page request,
Use the auto_prepend_file directive in php.ini or in an .htaccess file. It can be set on a per-directory basis. http://docs.php.net/manual/en/ini.core.php#ini.auto-prepend-file.
Copy link to clipboard
Copied
Thanks for the help guys, I played around with ASP.Net some time ago, but just felt I might be painting myself into a corner. PHP seemed a better option allowing my sites to continue to work on MsSql while I slowly moved it all over to MySql and be platform independent. It's been quite easily really, the only hassle was my dependence on the global.asa.
And thanks for the advice on Wordpress etc, I'll checkout the structure
cheers
Find more inspiration, events, and resources on the new Adobe Community
Explore Now