Insert query whats wrong with it
Posted: Fri Feb 18, 2005 9:30 am
Could someone please tell me whats wrong with my insert query - it worked perfectly but once I tried to incorporate my DATE_FORMAT code it stoped working - the date format code itself works fine as when I print results with the select query it works properly. its just I need to incorporate it into my insert as well - there is probably just something wrong with the order can anyone help.
Code: Select all
"INSERT INTO people
(person_id,org_id, salutation,
firstname, surname, organisation, role,
address1, address2, city, postcode, telephone,
mobile, fax, dateoflastcontact, datecontactagain,
notes, email)
VALUES
('$person_id','$org_id','$salutation',
'$firstname','$surname', '$organisation',
'$role', '$address1', '$address2', '$city',
'$postcode', '$telephone', '$mobile', '$fax',
'$dateoflastcontact', '$datecontactagain',
'$notes', '$email')
DATE_FORMAT(dateoflastcontact, '%d/%m/%y')
AS dateoflastcontact, DATE_FORMAT(datecontactagain, '%d/%m/%y')
AS datecontactagain
";
ї\code]