[PHP-DB] Re: Multiple Inserts

2004-06-23 Thread Achieve IT
Solved... I needed to find a way to get the latest auto_increment value. I did this using, $new_id = mysql_insert_id(); Thanks, Declan. Thanks for the suggestions. I have $TimeSheetID=$_POST['TimeSheetID']; at the start of the script. However, what I neglected to

[PHP-DB] Re: Multiple Inserts

2004-06-23 Thread Rui Cunha
some tips when inserting data: instead of inserting into the the table, do some debugging,echo the insert string and check if: 1- all string fields are between single comma ('field_name').Numéric fields do not need single comma; 2- all not null fields are present in the field list; 3- you're

[PHP-DB] Re: Multiple Inserts

2004-06-22 Thread Kim Steinhaug
A simple way to debug your scripts would be like this : FROM : $result_timesheet=mysql_query("INSERT INTO tblTimesheet (TimesheetID, WorkerID, ClientID, TimesheetDate, ProspectiveOrRetrospective) VALUES ('$TimeSheetID','$WorkerID','$ClientID','$TimesheetDate','$ProspectiveOrRetr ospective')")or di

[PHP-DB] Re: multiple inserts

2002-04-21 Thread Steff
could you provide the table schema please? after all (apart from the fact that you may have conflicts with the autoincrement of the id row) your table is not normalized! create separate tables for albums *and* songs (and ...): music_albums album_songs artists album_artist (table resolving the