Jump to content

PHP script


KaiSheng

Recommended Posts

Hey guys. Well, it's me again.

 

I have a question in mind, is there any way possible to create database tables and fields

using php script instead of manually creating it in database?

 

If so, if any of you have any resources about this, i hope you will share it with me :)

Thanks.

Link to comment
https://forums.phpfreaks.com/topic/283890-php-script/
Share on other sites

 

 

I have a question in mind, is there any way possible to create database tables and fields

using php script instead of manually creating it in database?

Yes, but you still got to type out the queries manually for creating the databases/tables.

 

You're better of using some form of gui such as MySQL Workbench (desktop gui) or using phpMyAdmin (web based gui) to easily manage your MySQL server.

Link to comment
https://forums.phpfreaks.com/topic/283890-php-script/#findComment-1458233
Share on other sites

Then you have four options at least:

 

  1. Use a MySQL TIMESTAMP type column which will automatically set to current date on INSERT and optionally on UPDATE
  2. Use a DATE type column and place CURDATE() into the column on INSERT
  3. USE a DATETIME column and place NOW() into the column on INSERT
  4. Use PHP to get current date and place that in the date column
Link to comment
https://forums.phpfreaks.com/topic/283890-php-script/#findComment-1458328
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.