patheticsam Posted January 21, 2009 Share Posted January 21, 2009 Hi! I have a SELECT SQL query that will add start_time value PLUS lenght value to make the end_time value $sql = "SELECT `date`, TIME(`start_time` + `lenght`) as end_time FROM table1 WHERE host='$host' AND city='$city' ORDER by `date`, `start_time`"; I was just wondering if it's possible to do the same operation but inversed(with INSERT) so the value of start_time + lenght would be inserted into end_time. Thank you! Link to comment https://forums.phpfreaks.com/topic/141838-little-question-with-select-and-insert/ Share on other sites More sharing options...
revraz Posted January 21, 2009 Share Posted January 21, 2009 Just one row (LIMIT 1) or every result? Link to comment https://forums.phpfreaks.com/topic/141838-little-question-with-select-and-insert/#findComment-742682 Share on other sites More sharing options...
patheticsam Posted January 22, 2009 Author Share Posted January 22, 2009 Just one row. The inserted data will be come from a POST form Link to comment https://forums.phpfreaks.com/topic/141838-little-question-with-select-and-insert/#findComment-742910 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.