如何在这一行中使用NOW()

hope you're fine... first, I would like to say that English is not my first language, so I'll try to explain my problem.

I have a website for tv shows subtitles and now I'm adding a new variable in my web, where I can select the option to upload a subtitle and it will be hidden (invisible on my index).

So, I have all the variables and the rest of the programmation.

Thing is that when I'm trying to put the variables in the same order that are in my database, I can't make it work:

For example.

If I use:

$query = "INSERT INTO fversions(subID,fversion,author,versionDesc,comment,hidden,indate) " .
 "VALUES(" . $subID . "," . $fversion . "," . $userID .
   ",'" . $fversions . "','" . $comment . "','" . $hidden . "',NOW())";
     mysql_query($query);

<

It's working... thing is that in my databse, "indate" is before "hidden"... it's indate and then hidden because is the new row.

So, I'm trying to put the values in order but I can't make it work.

 $query = "INSERT INTO fversions(subID,fversion,author,versionDesc,comment,indate,hidden) " .
"VALUES(" . $subID . "," . $fversion . "," . $userID . ",'" . $version . "','" . $comment . ",NOW(),'" . $hidden;
                   mysql_query($query);

If I put indate and then hidden (just to have everything in order), it's not working because I don't know how to write that line...

I'm not developer, I lost mine, So I'm trying to do my best and I don't know how to write the values NOW() and $hidden so it could work.

NOW() is the value of indate, that is the hour (actual time).

Could anyone could write me how I need to write this sentence:

  "VALUES(" . $subID . "," . $fversion . "," .
       $userID . ",'" . $version . "','" . $comment . ",NOW(),'" . $hidden;

So it could work?

Thanks a lot!

Based on the last question and code.

You're going to want to move to mysqli from mysql sooner rather than later. The former will be deprecated if you update your php version.

Assuming all your php variables except $version and $comment are integers/floats:

VALUES(" . $subID . ", " . $fversion . ", " .
   $userID . ", '" . $version . "', '" . $comment . "', NOW(), " . $hidden . ")"

You could improve with sprintf():

sprintf("VALUES(%d, %d, %d, '%s', '%s', NOW(), %d)", [
    $subID, $fversion, $userID, $version, $comment, $hidden
]

You could improve further with mysqli_real_escape_string:

sprintf("VALUES(%d, %d, %d, '%s', '%s', NOW(), %d)", [
    (int)$subID,
    (int)$fversion,
    (int)$userID,
    mysqli_real_escape_string($dbLink, $version),
    mysqli_real_escape_string($dbLink, $comment),
    (int)$hidden
]