I see this statement in the code
INSERT INTO question.surveykey (dateposted,entryCount) VALUES ('$date',0)
,
Shouldn't it be a table name after insert into statement? What does it mean to have a dot after that?
You can find plenty of examples in the manual regarding identifier qualifiers.
You can refer to a table within the default database as
tbl_name
, or asdb_name.tbl_name
to specify a database explicitly.
Without the explicit mention of a database name, the default database is used (when you're on the console, you'd set the default database by entering use db_name
).
This comes in handy when you've got a seed file that populates tables across multiple databases, or if you're in one database (using console) and you want to operate on a table in another.