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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.