Copy link to clipboard
Copied
This is half rant and half question.
I've been using ASP and MS SQL for years and started to move to PHP
So here's my question. Normally, when I'm using Stored Procedures in MSSQL, I create it in the database...no problem.
I then create a recordset in Dreamweaver that calls this procedure.
It looks something like this...{call user.nameofprocedure}
Above is the only thing I see in the recordset unless I'm pulling in a variable... Using SPs is nice because I don't have to open each page of my site if I want to change all the pages that use the same Stored Procedure. How can I pull in a stored procedure? Is it similar to this? {call user.nameofprocedure}\
Does using PHP mean I have to start writing queries in dreamweaver instead of the database?
I hope Dreamweaver supports SP; please let me know how to do this. Thanks
If now, I think I'm going to be really depressed about this. And if so, I will start to feel the pains as I start to realzie that the hype surrounding PHP has NOT lived up to the reality. I understand why open source is such a great thing but it just hasn't made anything any easier.
As I said, I've been using MSSql for years and then moved to MySQL. The interface and tools that MSSQL has are great. Features and "easy" to use. Now I'm trying to pick up with PHP/MySQL and I'm just not finding the same sophistication that I found with ASP/MSSQL...Man, I really want ot like php..but it's really hard to see why when it seems that so much is missing. I just keep finding that there's a "roughness" to things associated with PHP?MySQL vs ASP/MS SQL.
IF PHP is the wave of the future, with Adobe and EVERYTHING else I"ve seen, they don't seem to be making it any easier.
It just seems, if you're going to replacing something with another technology, shouldn't it be better?
Open source is great all but why is everyone discontinuing support?\\
Well, back to my original question, does anyone have a good example of I can implement a stored procedure in Dreamweaver/php/MySQL?
Copy link to clipboard
Copied
s
Copy link to clipboard
Copied
LArtJunky wrote:
I hope Dreamweaver supports SP; please let me know how to do this.
Dreamweaver's PHP server behaviors do not support stored procedures. Why? For the very simple reason that the server behaviors were designed in 2002, and have remained basically unchanged since then. Stored procedures were not added to MySQL until version 5.0, which was released in 2005, three years after the server behaviors were designed.
If now, I think I'm going to be really depressed about this. And if so, I will start to feel the pains as I start to realzie that the hype surrounding PHP has NOT lived up to the reality.
This has nothing to do with PHP. PHP is simply a server-side language that processes data and assists in communication with a database.
It sounds as though you have grown to become dependent on Dreamweaver server behaviors. They have always offered only the most basic functionality, and probably always will. Probably not the message you wanted to hear, but that's the way I see the situation.
Copy link to clipboard
Copied
Dreamweaver's PHP server behaviors do not support stored procedures. Why? For the very simple reason that the server behaviors were designed in 2002, and have remained basically unchanged since then. Stored procedures were not added to MySQL until version 5.0, which was released in 2005, three years after the server behaviors were designed.
David, I was aware that MySQL SPs are new. It just seems as though Adobe could update the server behaviors to fit the new technology.
This has nothing to do with PHP. PHP is simply a server-side language that processes data and assists in communication with a database.
Basically, I'm an Artist first and I have to admit that programming does not come easy to me...obviously. However, I'm a one-man-shop (always have been) so I"m forced to dig into things that I never thought I'd have to learn. Those Extensions have allowed me access into areas of programming that I never would have gotten into. In the long run, I probably would have been better had Macromedia not offered that functionality; I would have stayed grounded in the code itself. Before Dreamweaver's Behaviors came along, I was doing programming by hand in ASP and things were painfully slow and hard to learn because nobody else I knew was doing this stuff and there was just so little information out there to help. When those Extensions came along, It was such a relief and whole new areas opened up to me.
I just wish things would get easier rather than harder. I think we are still in the infancy of all this web development. Eventually I think Designers like myself won't have to deal with this stuff...it will all just be "built in."
I know that this Stored Procedure thing has nothing to do with PHP. I'm just want to be able to replicate SPs in PHP and still have Dreamweaver display my bindings . I like how easy these things can be and I buck against going backwards. Imagine if an Artists in Illustrator, in order to draw a box, had to work out the programming in asci every time they wanted that box? Well, that's generally where we're at with Web Design. Eventually, if you want a complete shopping cart, you'll just drop one into your design...Blog? Drop it in...I guess what drives me crazy right now is that it's a Programmers world. Programmers designing the code that builds the structure of the sites. Had Designers had a hand in this code development, we would have had columns in css.
Well, I guess I'll have to find my way through this stuff because I'll be retired before my future vision of Web Design is a reality.
Copy link to clipboard
Copied
So how do I connect using a stored procedure and PHP? I couldn't find anything on the web that shows how it might work with Dreamweaver.
Will I still be able to use Dreamweaver's server behaviors?
Copy link to clipboard
Copied
LArtJunky wrote:
So how do I connect using a stored procedure and PHP? I couldn't find anything on the web that shows how it might work with Dreamweaver.
I don't use stored procedures, so I can't tell you anything other than what I said before. Dreamweaver's server behaviors do not support stored procedures in MySQL.
Will I still be able to use Dreamweaver's server behaviors?
Yes, but not with stored procedures.
Copy link to clipboard
Copied
Using Dreamweaver's "Advanced Recordset" window is a drag.
I've gotten used to editing SQL inside the database itself. The code hinting and error warnings make doing it so much easier. When something isn't quite right you know it. I've used SQL Server and I have played with MySQL and both offer similar functionality in this respect.
David, I'm now trying to get an idea what your process might look like? Can you explain how YOU might go about creating recordsets? Do you basically work in code view for anything that's dynamic? Do you think your method of working might be similar to the average PHP/MySQL Developer's process?
Without SPs, I wonder how one might update or insert to multiple tables? Over the years, I've seen people explaining how to use stored procedures to write to multiple tables in a database and I wonder how this might be done without SPs?
Copy link to clipboard
Copied
LArtJunky wrote:
David, I'm now trying to get an idea what your process might look like? Can you explain how YOU might go about creating recordsets?
I'm not really the right person to ask. I cut my teeth developing with PHP and MySQL in order to develop and maintain a bilingual Japanese-English content management system for a project that I ran for six years. Everything was hand-coded, and it was done in the days before MySQL had support for stored procedures. I also did most of the work with MySQL at the command line.
I decided to close down the project a few years ago, and have since devoted my time to writing books. I teach beginners to use the tools that exist in Dreamweaver. I have a copy of "MySQL Stored Procedure Progamming" by Harrison and Feuerstein on my bookshelf, but it remains largely unread. Dreamweaver doesn't support MySQL stored procedures, and I have no active need to use them myself.
I have recently been doing some experimentation with the Zend Framework. I'm not sure whether it supports stored procedures, but it does make it possible to use PHP with MS SQL Server. Unfortunately, the Zend Framework documentation assumes a lot of familiarity with PHP. I'm afraid there isn't going to be an easy transition for you. If you want to use stored procedures, you'll need to hand-code everything yourself. If you want Dreamweaver to do a lot of the coding for you, you'll need to learn to work within its limitations. Updating multiple tables using server behaviors involves using the Insert Record server behavior several times in sequence.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more