yoda699 Posted November 24, 2009 Share Posted November 24, 2009 I'm sending some information to mysql server to format a string into datetime format that the server can understand. I'm running into problems regarding fetching that data. $connection = mysql_connect(DB_SERVER, DB_USER, DB_PASS) or die(mysql_error()); mysql_select_db(DB_NAME, $connection) or die(mysql_error()); $newSqlDate = "SELECT STR_TO_DATE('$newDateTime', '%m/%d/%Y %h,%i,%p');"; $result = mysql_query($newSqlDate); $row = mysql_fetch_array($result) or die(mysql_error()); echo "Date and Time: ".$row['datetime']; mysql_close($connection); My echo returns only: "array" Thanks Link to comment https://forums.phpfreaks.com/topic/182801-fetching-the-data-from-str_to_date/ Share on other sites More sharing options...
fenway Posted November 24, 2009 Share Posted November 24, 2009 Don't double-post. Link to comment https://forums.phpfreaks.com/topic/182801-fetching-the-data-from-str_to_date/#findComment-964960 Share on other sites More sharing options...
Recommended Posts