Jump to content

A MYSQL ORM using Magic Functions


sandeep529

Recommended Posts

hi,

 

This is a MySQL ORM Class which (I think) minimises keystrokes required for carrying out an MySQL  Operation in PHP.

 

It uses magic functions in PHP5 ,So there are only very few function names to remember while using it.For example a new row can be inserted in the table `user`

using the following line

 

$db->user=array('name'=>'user_1','no'=>25,'key'=>45,'joined_date'=>(object)"NOW");

 

Eliminating the String In String nature of mysql queries was also a goal in creating this class

I think missing a single quote from a big query string  can be pin point.But a missing a terminating single quote from a php string will be detected in the editor itself if it supports syntax highlighting(editors like netbeans).

 

I am attaching a tar file containg the class file,a demo,and a howto guide.The demo can be used for testing the features of this class,(or better things like testing regular expressions..)

 

Please take a look and let me know your comments..

 

Thanks,

Sandeep.

 

 

 

 

 

[attachment deleted by admin]

Link to comment
Share on other sites

hi,

 

This is a MySQL ORM Class which (I think) minimises keystrokes required for carrying out an MySQL  Operation in PHP.

 

It uses magic functions in PHP5 ,So there are only very few function names to remember while using it.For example a new row can be inserted in the table `user`

using the following line

 

$db->user=array('name'=>'user_1','no'=>25,'key'=>45,'joined_date'=>(object)"NOW");

 

Eliminating the String In String nature of mysql queries was also a goal in creating this class

I think missing a single quote from a big query string  can be hard to  pin point.But a missing a terminating single quote or double quote from a php string will be detected in the editor itself if it supports syntax highlighting(editors like netbeans).

 

I am attaching a tar file containg the class file,a demo,and a howto guide.The demo can be used for testing the features of this class,(or better things like testing regular expressions..)

 

Please take a look and let me know your comments..

 

Thanks,

Sandeep.

 

[attachment deleted by admin]

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.