Pluralize and Singularize

14 de Julio, 2008

I’m using pluralize from kuwamoto,
http://kuwamoto.org/2007/12/17/improved-pluralizing-in-php-actionscript-and-ror/

who inspire in Paul Osman PHP Pluralize Method
http://www.eval.ca/articles/php-pluralize

PHP ActiveRecord version0 release5

3 de Junio, 2008

Here is a new version of the php activerecord i hope you like.

http://code.google.com/p/pactiverecord/downloads/list

PHP ActiveRecord v0 release 1

10 de Julio, 2007

Here is my own version of the Active Record pattern for PHP and MySQL. As you can see the class is a little rudimentary but the idea was to do something simple that work always.

PHP Active Record v0.001

How to use it?

Simple extend your model from the Active Record class

Example

Table 1:
Members
* id
* name
* email

Table 2:
Posts
* id
* title
* member_id

File 1: member.php

class Member extends ActiveRecord
{
var $has_many = array("Posts");
}

File 2: post.php

class Post extends ActiveRecord
{
var $belongs_to = array("Member");
}

File 3: index.php

< ?php
$member = Member::new_instance('Member');
$member->find(’All’); // returns a member object array
$member->find(3); // set meber where id=3
$member->Posts; // returns a post object array
?>

I really wanted to write something better, but first English is no my nature Language, and second is 2:41 am. So when I found a little time I will update the info, meanwhile if you want you can put you review at the comments section

Fireworks Autoshape’s

4 de Junio, 2007

Click
here to download the fireworks form autoshape