G

Issue with deleting a row

  • Thread starter Thread starter grantus
  • Start date Start date
G

grantus

Guest

I'm trying to delete a row:

Code:
Code:
private static function deletePending($table, $upload_id) {

    $db = \XF::db();

    $rowsDeleted = $db->delete($table, [
         'upload_id' => $upload_id
     ]);

}

And I'm calling it in another method like this:

Code:
self::deletePending('xf_ill_bfights_uploads', $row['upload_id']);

But I'm getting this error:

Code:
ErrorException: [E_WARNING] Array to string conversion

It keeps pointing to this line:

Code:
'upload_id' => $upload_id

The...

Read more

Continue reading...
 
Similar threads Most view View more
Back
Top Bottom