There's the Retro way in my framework, you can copy the record and recordbase (.php) files and use it in your project like this (just need to change a few lines for it to work manually):
PHP Code:
<?php
$rb = new RecordBase();
$rb->connect($host, $user, $password);
$rb->select($rb);
$filters['name'] = 'marc';
$users = find('users', $filters);
$new_user = record('users');
$user->name = 'yam';
$user->save();
// update a single user
$user = single('users', array('name' => 'yam'));
$user->name .= 'marc';
$user->save();
// update 10 first users
$users = find('users', null, 10);
foreach($users as $user)
{
$user->name .= ' - updated';
$user->save();
}
Edit:
On second thought, you could just give the whole framework a try.
It includes form validation and more.
Bookmarks