Jump to content

Few SQL problems


byrne86

Recommended Posts

I have a cron job that creates a table once a day, the problem I am having is, I need the name of the table to be todays date, I have tried using a php variable, but I couldnt get the CREATE to have a php variable as the tablename.

 

What is the best way to make the tablename being created todays date?

 

Also, what is the best way to get 10 entries from 1 table on a database and insert them into a different table on a different database using php?

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/217481-few-sql-problems/
Share on other sites

Forget that problem, I have sorted it out, I do have a new problem though.

 

I am trying to automatically insert a datetime into a field on a table from a web form, everything I have tried has just returned 0000-00-00 00:00:00, I want to use the SQL datetime, and not the php timestamp, so I can sort it better in my database

Link to comment
https://forums.phpfreaks.com/topic/217481-few-sql-problems/#findComment-1129380
Share on other sites

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.