1

How can I implement the below query using pdo notorm?

mysql_query("DELETE FROM table WHERE (down-up)>=some value AND id=$id");

I know the below statement will delete the selected row with id of value $id. But I am confused on, how can I check the condition, (down-up)>=some value in my delete statement.

$row  = $db->table[$id];

$affected = $row->delete();

Please help me out.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
SRG
  • 75
  • 1
  • 8

1 Answers1

1

Try this

$notORM->tablename("id", $id)->where("down-up >= value")->delete();

I haven't tested it, let me know if you have any issues.

LX7
  • 609
  • 1
  • 6
  • 22