Page 1 of 1

Confused about what seems a simple query

Posted: Fri Oct 07, 2005 5:00 am
by mhouldridge
Hi,

I am trying to insert a new record into my database with a simple query. I have echoed it within my code, and everything appears fine. Here is the code;

Code: Select all

$query2 = "INSERT INTO audithistory(id, postdate, title, username )
VALUES('$title', NOW(), '$asset deleted from the database', '$name')";
$result2 = mysql_query($query2);
Any ideass why this is not going through.


regards,
Mark

Posted: Fri Oct 07, 2005 6:41 am
by mhouldridge
sorted it out now,

I was using a primary key for one field, and it wouldnt allow another field with the same id.