PDA

View Full Version : server behavior insert record curtime() MYsql


ianrthompson
01-04-2012, 08:32 AM
I have the following query which works in Mysql it allows me to enter a competitor number and also records and saves the current time to the record. I'm not sure how to make this work with dreamweaver. I create an insert record which allows me to enter the number but i'm not sure where I can add the MYsql curtimr() function.

INSERT INTO `racetimes`( `competitor`, `time`, ) VALUES ([competitor number],curtime())

I think it goes in here somewhere but its trial and error at the moment
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
$insertSQL = sprintf("INSERT INTO racetimes (competitor, ) VALUES (%s)",
GetSQLValueString($_POST['competitor'], "int"));

Any ideas