View Single Post
  #2 (permalink)  
Old 2008-04-14, 01:47 AM
hoopyfrood hoopyfrood is offline
Junior Member
 
Join Date: Apr 2008
Location: Cheltenham, UK
Posts: 12
hoopyfrood is on a distinguished road
Default FIXABLE: PHP/MySQL inserting multiple records

Hi cancer10,

what you're doing is indeed one of the many ways of doing it. What you're essentially doing is querying the database each time you're entering the data.

providing you know how many records you'd be entering you could either:
  • a) merge it all in one long query
  • b) use foreach/while (whichever you prefer) to build the dynamic SQL and query it automatically
  • c) does each record goes to defferent table? you could optimise your SQL to group relevant SQL...
If you feel like providing sample of your code I might be able to help you more...

Good luck,
hoopyfrood
__________________
Love your documents!

DocuView - The best Web 2.0 document management system (DMS) - utilising the latest technology to help your company achieve ISO 9001 certification.
Reply With Quote