0

I'm trying to delete a row on a remote database, but I keep getting this when I try and run my statement:

SQLSTATE[HY000]: General error: 1934 General SQL Server error: Check messages from the SQL Server [1934] (severity 16) [(null)]

As you can see, it doesn't give much info. I've checked with the admin of the db, and he said I have delete permissions. I even sent him the exact statement I'm trying to run, and it worked perfectly on his end (he even tested it with my credentials).

Here's the code I'm trying to run:

$sql = "DELETE FROM " . $delTable . " WHERE id = '" . $result['Id'] . "'";
$sth = $dbc->prepare($sql);
$res = $sth->execute();
print_r($res);die();

When compiled, the sql looks like this:

DELETE FROM svcQueuedObjects WHERE id = '421272'

I have successful results with select statements in the exact same format (prepare, execute, fetchAll), so I'm not sure why this is not working.

Thanks in advance for any help you can offer, my head is bloody from banging it against the wall for so long!

hugmungus
  • 876
  • 1
  • 13
  • 23

0 Answers0