PHP:
prepare(\"SELECT * FROM `users`\"); $stmt->execute(); $result = $stmt->get_result(); //
I had to insert date at the beginning of the lines of a log file and it's done like below:
DATE=$(date +"%Y-%m-%d") awk '{ print "'"$DATE"'", $0; }' /path_to_log_file/log_file.log
It can be redirect to another file to save