|
Posted by Mark D. Smith on 04/21/06 19:17
Hi
i am trying to update a group of values in 1 table all at once.
my sql string is
$sql = "UPDATE job_adverts (Posted_ID, Date_Posted, Job_Title, Job_Code,
Job_Location, Job_Salary, Job_Description, Company_image, Contact_Name,
Contact_Email, Contact_Web, Contact_Company, Contact_Address,
Contact_Telephone, Contact_Fax, company_id, views) SET ('$Posted_ID',
'$Date_Posted', '$Job_Title', '$Job_Code', '$Job_Location', '$Job_Salary',
'$Job_Description', '$Nom_Image', '$Contact_Name', '$Contact_Email',
'$Contact_Web', '$Contact_Company', '$Contact_Address',
'$Contact_Telephone', '$Contact_Fax', '$company_id', '$views') WHERE
ID='$ID'";
but this fails, how should i re-write it? its based on the INSERT INTO code
below which works.
$sql = "INSERT INTO job_adverts (ID, Posted_ID, Date_Posted, Job_Title,
Job_Code, Job_Location, Job_Salary, Job_Description, Company_image,
Contact_Name, Contact_Email, Contact_Web,
Contact_Company, Contact_Address, Contact_Telephone, Contact_Fax,
company_id, views) VALUES ('$ID', '$Posted_ID', '$Date_Posted',
'$Job_Title', '$Job_Code', '$Job_Location', '$Job_Salary',
'$Job_Description',
'$Nom_Image', '$Contact_Name', '$Contact_Email', '$Contact_Web',
'$Contact_Company', '$Contact_Address', '$Contact_Telephone',
'$Contact_Fax', '$company_id', '0')";
Mark
--
--
Obantec Support
www.obantec.net
0845 458 3121
WebHosting and Domains
Nominet UK Member & IPStag Holder
CentralNic Accredited Reseller
[Back to original message]
|