 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
PHPEasy.co.uk: Object Orientation Basics part 4 - Implementing CRUD methods
by Chris Cornutt August 07, 2012 @ 12:23:36
PHPEasy.co.uk continues their series looking at some of the basics of Object-Oriented Programming (OOP) in PHP with part four showing how to implement CRUD methods (Create/Read/Update/Delete) on a database connection.
In the last tutorial in this beginners series we discussed using PDO to connect to a MySQL database. Following on from that tutorial we are going to improve the Guitar class we made by adding some basic CRUD methods so that our class can interact with our database using PDO.
He brings back the same class structure and shows how to take a "Guitar" object, create a connection via a "conn()" method and use the getters/setters to assign values for saving, selecting, deleting and updating the database's records.
voice your opinion now!
oop object oriented introduction pdo crud
Developer Drive: Create Your Own CRUD App with MySQL and PHP
by Chris Cornutt November 01, 2011 @ 08:06:52
On the Developer Drive blog today there's a new tutorial helping you build out a simple CRUD (create, read, update and delete) system using a MySQL backend. This is just the first part of the series, introducing you to some concepts and getting the ball rolling connecting PHP and the database.
You're may be wondering what exactly CRUD is. CRUD simply stands for Create, Read, Update and Delete and it is the one of the fundamental principles of programming logic that can be expanded and applied to larger projects. For example, let's imagine we're creating a social network and we like to have the ability for users to create accounts, edit and update information for those accounts and also delete said accounts; that is CRUD at work.
This first part covers the structure of the database that'll make up the storage and includes a brief snippet of code to connect your PHP to the database (using PDO).
voice your opinion now!
crud database mysql tutorial application simple introduction
ZetCode.com: SQLite PHP tutorial
by Chris Cornutt October 17, 2011 @ 12:12:48
If you're in the process of prototyping a site or just need a lightweight storage tool for your application, you might look into SQLite. Fortunately, PHP has direct support for it and this great tutorial from ZetCode.com will introduce you to some of the basic concepts you'll need to get working (it's a bit older, but still very useful).
This is a PHP programming tutorial for the SQLite database. It covers the basics of SQLite programming with PHP language. There are two ways to code PHP scripts with SQLite library. We can use procedural functions or OOP objects and methods. In this tutorial, we use the classical procedural style. You might also want to check the PHP tutorial or SQLite tutorial on ZetCode.
They go through the basic installation (on a linux platform, but easily adapted to others) including changes to your php.ini and the creation and use of a first sample database. You'll find the interface very similar to some of its other RDBMS cousins with a few exceptions. They show you the CRUD basics - creating records, reading the contents of a table, updating data already there and deleting records. There's also a simple form tutorial that takes a name and gender and does the inserts.
voice your opinion now!
sqlite tutorial crud form example
SpeckBoy.com: Getting Started with CRUD In PHP
by Chris Cornutt February 18, 2011 @ 12:10:10
On SpeckBoy.com there's a new tutorial posted that introduces you to the concept of CRUD - Create, Read, Update, Delete - in the database interface for your application. Technically CRUD can be applied to any sort of data store, but they chose to go with a MySQL-based example.
It has become a common necessity for website owners to collect data and manage it properly. Creating a MySQL CRUD class allows you to conveniently create, read, update and delete entries for any of your projects, indifferent of how the database is devised. CRUD allows us to generate pages to list and edit database records.
So, in this tutorial I will show you how to build a simple CRUD web app, that will empower you with the basic functions of database management.
They briefly walk you through the setup of a XAMPP server to use as a base and give you the settings needed to create a simple users table. The rest of the post is the code you'll need to make the connection from your PHP script, insert data into the table, update them, remove the rows and display their contents. They've wrapped it all up in a single "index.php" file to make it simpler.
voice your opinion now!
crud database mysql tutorial create read update delete
SANIsoft Blog: The longer Lithium Blog tutorial using MySQL '" Part 1
by Chris Cornutt April 15, 2010 @ 12:31:08
On the SANIsoft blog there's a recent post looking at using the Lithium framework with MySQL (the first part of a series).
Lithium is a lightweight, fast, flexible framework for PHP 5.3+. It is still in dev release state but is under active development. This post, as the title suggests, is to introduce you to this new framework using the typical blog tutorial.
They help you clone the latest version of the framework from github, update the default files to change the main page, set up some routing and connect to the database. They include the SQL to create a sample "posts" table and pull some data out of it. There's also some code to help you add, edit and delete posts from the table with Lithium's built-in database layer.
voice your opinion now!
lithium tutorial mysql crud framework
Eric Bannatyne's Blog: Simple CRUD With CodeIgniter
by Chris Cornutt April 06, 2010 @ 11:50:30
In a new post to his blog Eric Bannatyne has written up a simple example of using the CodeIgniter PHP framework to create a basic CRUD interface (create, read, update, delete) for a basic "posts" table.
Last week we took a look at an introduction to the CodeIgniter PHP framework. In that example we saw the basics of how CodeIgniter works and the basics of the MVC pattern. But we didn't really do much with models. Today we will look at the power of models in CodeIgniter to make CRUD functions easy.
They help you create the basic table in a MySQL database (instructions could be easily customized for the database of your choice) and how to set up the controllers, models and views. The delete method is the only one that's slightly different - there's not a view for it as much as there is a controller action using the ID on the URL.
voice your opinion now!
crud codeigniter tutorial database
|
Community Events
Don't see your event here? Let us know!
|