Hello,
I am using a form to Insert data into 2 tables in the same database.

$TimesheetID needs to be in each table. However, it is not being inserted
into the second table, "tblTimesheetDetails" . Any advise?

$result_timesheet=mysql_query("INSERT INTO tblTimesheet (TimesheetID,
WorkerID, ClientID, TimesheetDate, ProspectiveOrRetrospective) VALUES
('$TimeSheetID','$WorkerID','$ClientID','$TimesheetDate','$ProspectiveOrRetr
ospective')")or die("Insert Error: ".mysql_error());

$result_timesheetdetails=mysql_query("INSERT INTO tblTimesheetDetails
(TimesheetID, ActivityTypeID, TimeSpentHours, TimeSpentMinutes) VALUES
('$TimeSheetID','$ActivityTypeID','$TimeSpentHours','$TimeSpentMinutes')")or
die("Insert Error: ".mysql_error());


Thanks,
Declan.

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to