Jump to content

copy info in MYSQL DB into same DB with different date ref


ppgpilot

Recommended Posts

I used to code a long time ago - PHP5.

 

It is slowly coming back to me but not fast enough...

 

I need to copy data from a mysql data base and put it back in unchanged with another date reference.

 

This is a calorie recorder that tracks daily calories - food type, calories, protein, carbs, etc.

 

I simply want to take each entry in that day, then copy it exactly except changing the date recerence.

 

If I could say "copy all entires where date = (date) into DB  with new date (date), that would do it.

 

The only thing I can think to do is pull each item out  and place it back into the DB with a while statement.

 

There has to be an easier way...

 

If that is my only option, I need to figure out how to create a while statement to handle an array to do the job.

 

Any thoughts?

 

Thanks for the help!!

 

David

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.