Posts Tagged ‘php’

wordpress 2.6 vs wordpress mu

Tuesday, July 22nd, 2008

The latest update for wordpress was released some days ago. Today I upgraded this blog too - I hope everything still works. But I have to upgrade some more blogs and thats a damn job. I am using subversion to get new files, but I still have to upgrade for every single blog. For sure I have changes on the layout differing from blog to blog, so something may fail. Maybe I should give wordpress multi-user a try?

phpdoctrine: a php or mapper

Sunday, May 4th, 2008

I am about to construct a page for a friend. It’s about a german car racing series called “Spezial Tourenwagen Trophy”. Due to I am tired of writing all the PHP stuff by my own, I ve been searching for an OR Mapper and found php doctrine, which runs with PHP 5.2.2+. Unfortunatelly the webspace does not provide PDO with mysql so I had to switch to sqlite3.
php doctrine has a lean documentation, but most things are working as excepted and the system requirements match with the support of the webspace, so why should I switch? In addition I had to deal with yaml,yet another markup language - or as it is called today “YAML Ain’t Markup Language”. So you can easily declare your models like this:

Location:
  columns:
    id:
      type: integer(4)
      primary: true
    name:
      type: string(120)
    country:
      type: string(120)

And use it in your PHP code:

$locs = Doctrine_Query::create()
->from('location l')
->orderBy('name ASC')
->execute();