TGIF!!
I have an insert statement that checks to see if a condition is met. If it
is, then it adds that value to the insert statement. However, when I try to
run it I get the error: Can't use function return value in write context
Below is a sample of what I am using which gives me the error(The error
occurs while trying to insert the "due_date")
$insert2 = "INSERT INTO misc_service_payment_request SET";
if(empty($_POST['max_id'])) {
$insert2.=" id = scope_identity(),";
} else {
$insert2.=" id = '$max_id',";
}
if(!empty(trim('$due_date'))
$insert2.=", due_date='$due_date'";
mssql_query($insert2) or die ("Query failed: <br
/>".mssql_get_last_message());
Any ideas?