 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
DevShed: Inserting, Updating and Deleting Database Rows with Code Igniter
by Chris Cornutt September 24, 2008 @ 12:03:27
DevShed continues their series focusing on the CodeIgniter framework with the seventh part - a look at interacting with the database to update, delete and insert rows from your application.
You've seen some of the things you can accomplish with the Code Igniter PHP framework in earlier parts of this series. In this seventh part of the series, you will learn, through copious examples, how to perform insertions, updates and deletions on a selected MySQL table by using Code Igniter's database class. You'll see that these tasks are very intuitive and easy to grasp, thanks to Code Igniter's friendly learning curve.
They show how to make conditional select statements (with where clauses) and do both inserts of new information and updates to current information, all with the built-in model functionality the framework provides.
voice your opinion now!
codeigniter framework tutorial update delete insert conditional
ProDevTips.com: CRUD with PHP Doctrine
by Chris Cornutt August 25, 2008 @ 11:19:37
In a fourth part of their series looking at using Doctrine in PHP, the ProDevTips blog moves on to implementing it in a typical CRUD interface.
They create the links between the tables (two hasOne relationships), a search() method to find the destinations for a user, a sorting method to multisort based on the subkeys of the value passed in and the methods for updating the information already in the database.
That's it for now, feel free to download this tiny Smarty and Doctrine framework. Note that for this to work you have to put Smarty and Doctrine in the lib folder. There is a login interface involved, just click submit there without entering anything. There is also an SQL file in the trip_selector folder if you want to try this out with some test data (same as in the picture above).
voice your opinion now!
doctrine crud relationship update create retrieve delete
Ben Ramsey's Blog: Supporting PUT & DELETE in the Zend Framework
by Chris Cornutt February 28, 2008 @ 10:27:00
Ben Ramsey has recently blogged about some of the research and bit of development that he's done to add "more correct" functionality to the Zend Framework for working with RESTful interfaces - proper PUT and DELETE support.
I've recently been wrapped up in an effort to design and implement a RESTful API using the Atom Protocol for a project at work. We are using the Zend Framework as the underlying framework for the project, so, in order to follow the Atom Protocol, I needed to support the HTTP methods PUT and DELETE
Since the Zend Framework has been playing such a prominent role in the development, he's been digging into the Zend_Rest_Server component code and isn't too happy about its support for PUT and DELETE. As a result, he's proposed methods that might help resolve things such as isGet, isDelete, isOptions and getEntityBody. He' even created a patch to make the needed changes.
voice your opinion now!
rest interface zendframework put get delete patch
Raphael Stolt's Blog: Transforming data centered XML into SQL statements
by Chris Cornutt May 08, 2007 @ 10:27:00
In this new post on Raphael Stolt's blog, he shows a way that you can take XML that holds SQL information (in his example INSERTs and DELETEs) and transforms them into SQL statements via XSL stylesheets.
A canny data import technique that emerged from praxis, while working on the import of data-centered XML resources, is utilitizing the abilities of Xslt. The generation of the required SQL statements actually only needs a simple Xsl stylesheet which might import for an PHP XSLTProcessor object or pass to the xsltproc command line tool. Both further described approaches are based upon the libxslt library and are assuming the use of XSLT 1.0.
He starts with an example bit of XML that has the XSL stylesheet at the top that will be used to transform the data and the information to perform inserts on several "partner" values in the XML below. Following this, he creates a PHP class to load the file and apply the stylesheet.
He also mentions a few different approaches to the same problem - XSLTProcessor class approach returning a single SQL string , xsltproc approach and the XSLTProcessor class approach using the ability to use PHP functions as XSLT functions.
voice your opinion now!
transform xml sql statement xslt insert delete transform xml sql statement xslt insert delete
|
Community Events
Don't see your event here? Let us know!
|