KaiSheng Posted November 14, 2013 Share Posted November 14, 2013 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 More sharing options...
Ch0cu3r Posted November 14, 2013 Share Posted November 14, 2013 I have a question in mind, is there any way possible to create database tables and fieldsusing 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 More sharing options...
Barand Posted November 14, 2013 Share Posted November 14, 2013 there is an example here http://forums.phpfreaks.com/topic/282860-selectingsearching-rows-of-a-table-based-on-the-value-of-a-field-in-the-table/?do=findComment&comment=1453412 Link to comment https://forums.phpfreaks.com/topic/283890-php-script/#findComment-1458236 Share on other sites More sharing options...
KaiSheng Posted November 14, 2013 Author Share Posted November 14, 2013 Thank you. Link to comment https://forums.phpfreaks.com/topic/283890-php-script/#findComment-1458297 Share on other sites More sharing options...
KaiSheng Posted November 15, 2013 Author Share Posted November 15, 2013 But I need the current date instead of manually keying in the dates Link to comment https://forums.phpfreaks.com/topic/283890-php-script/#findComment-1458317 Share on other sites More sharing options...
Barand Posted November 15, 2013 Share Posted November 15, 2013 Then you have four options at least: Use a MySQL TIMESTAMP type column which will automatically set to current date on INSERT and optionally on UPDATE Use a DATE type column and place CURDATE() into the column on INSERT USE a DATETIME column and place NOW() into the column on INSERT 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.