What most people use is
$sql = "INSERT INTO .......etc.....";
So, I understand you. It looks unusual and also not how I and most would do it.
It is certainly possible to do so, but not what most do.
Another thing I really put a big questionmark for is this:
jokedate="today's date"
"today's date" .... I can not imagine any database accepts this for to define the date of today.
So, in my examples here I will just use "today",
as "today's date" have a disturbing single quote inside of it.
This is how most would do it. And me too.
It is simple and would work 100%
$sql = "INSERT INTO joke SET joketext='$joketext', jokedate='today'";
Here is my variant of the example you ask about.
This splits the $sql into two strings
and put the $joketext variable in the middle between:
$sql = "INSERT INTO joke SET joketext='" . $joketext . "', jokedate='today'";
Here is the example you refer to again.
Also splits the query string into two and put the variable in between:
$sql = 'INSERT INTO joke SET joketext="' . $joketext . '", jokedate="today"';