the blog of ndungi kyalo

i write web apps, and i also write about writing web apps. if writing web apps is wrong, i dont wanna be write :-)

Category: Web Development

Write your own PHP5 MVC framework: Handling databases [part 2] – The ORM

We had earlier introduced the concept of working with models (db objects) rather that writing db queries in your php scripts. We had seen how it offers a simpler object oriented interface to the db, and what a joy it is to work with. Here we expound on the M in ‘MVC’. In brief though, [...]

Replicating a mysql table structure

Just found out that as of mysql4.1 you can actually replicate a whole table structure (with no data, so cool!) with the command : create <new-table> like <old-table>; Just that! An older method is to attach a select statement to the create command like so : create <new-table> select * from <old-table>; This will actually [...]