I have a select and an update query that work perfectly if I manually enter the record numbers for cf_565, and id. The fields get updated as they should. as soon as I try to use the variables $cf_565 and $id it fails. I get no error messages. I would also like to use an IF statement to ignore the above code and continue using another variable such as $cf_581 which is a checkbox and it would be true with a 1
Thanks for suggestions where I am going wrong
Here is my code
Thanks for suggestions where I am going wrong
Here is my code
Code:
$result15 = mysql_query("SELECT
vtiger_crmentity.description,
vtiger_troubletickets.solution,
vtiger_troubletickets.ticketid
FROM
vtiger_troubletickets
Inner Join vtiger_crmentity ON vtiger_troubletickets.ticketid = vtiger_crmentity.crmid
WHERE
vtiger_troubletickets.ticketid = $cf_565");
$row = mysql_fetch_array($result15);
$trouble= $row['description'];
$fix =$row['solution'];
$sql = "Update communiq_vtcrm1.vtiger_invoice x, communiq_vtcrm1.vtiger_crmentity z Set x.terms_conditions= '$fix' , z.description='$trouble' Where z.crmid = $id and x.invoiceid = $id";
$result = mysql_query($sql);