View Single Post
Old 08-03-2009, 03:48 PM   #96 (permalink)
ETbyrne
how quixotic are you?
 
ETbyrne's Avatar
 
Join Date: Dec 2007
Location: Lapeer, MI
Posts: 445
Thanks: 37
ETbyrne is on a distinguished road
Default

Just added UPDATE and DELETE functions to the database driver:

PHP Code:
$table->update(array('friend'=>'Joe'))
      ->
where('friend','=','Joe Momma')
      ->
execute();

$table->delete()
      ->
where('user','=','Mary')
      ->
execute(); 
I'm thinking about making it so that the DELETE will also work like this:

PHP Code:
$table->delete('user','=','Mary'); 
Of coarse that would only work for simple deletes.

EDIT: Shorthand DELETE and SELECT added.

PHP Code:
$data $table->select('col','=','value');
print_r($data);

$table->delete('col','=','value'); 
__________________
Dingo Web Systems > http://www.dingocode.com
My Website > http://www.evanbot.com

Last edited by ETbyrne : 08-03-2009 at 04:37 PM.
ETbyrne is offline  
Reply With Quote