Very strange bug I think.
Here is the working code from project. Import into new install of SC8 on hosted environment.
/**
* Delete a record on another table
*/
// SQL statement parameters
$delete_table = 'mylocks'; // Table name
$delete_where = "RecordLocked = '{RecNbr}'"; // Where clause
// Delete record
$delete_sql = 'DELETE FROM ' . $delete_table
. ' WHERE ' . $delete_where;
sc_exec_sql($delete_sql);
When trying to edit this code at all… will not save… I get this error from the server: [HR][/HR] Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at webmaster@MYDOMAIN to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request. [HR][/HR] Apache/2.4.16 (Unix) OpenSSL/1.0.1e-fips mod_bwlimited/1.4 Server at MYDOMAIN Port 80 [HR][/HR]
[SIZE=14px]The problem seems to be the words DELETE FROM… because if I change the line to:[/SIZE]
$delete_sql = 'DELETE'.' FROM ' . $delete_table
[SIZE=14px]Then it saves and works ok.[/SIZE]