⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

DELETE FROM `<table_name>` WHERE `<field_name>` = '<string>'



nbowling
  • profile picture
  • Member

Posted 29 November 2012 - 20:32 PM

I would like to know if there is anyway of running the command below using GroceryCrud framework or if there any workaround.

I know I can create a connection string and run the sql but would like to keep within the framework

command:
DELETE FROM `<table_name>` WHERE `<field_name>` = '<string>'

Many thanks,

Nick

nbowling
  • profile picture
  • Member

Posted 03 December 2012 - 11:20 AM

I found a solution (once I had stopped being lazy)


function delete_films($rental)
{

$this->db->where('rental_duration ', $rental);
$this->db->delete('film');

}