 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
gemisigo
Joined: 11 Mar 2010 Posts: 2165
|
|
$DB$ content |
|
The snippet macro drop-down menu describes $DB$ as "Connection database name". What does this mean? Is this database that is changed by "USE mydatabase"? I created a snippet containing
 |
 |
$$SELECT DATABASE()$$
$DB$
|
but its result is
 |
 |
mydatabase
noDB
|
The login window for Query Browser also states "mydatabase" as the default schema.
|
|
Wed Jun 16, 2010 9:36 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
That $DB$ macro makes no sense for MySQL. So called MySQL databases are nothing more than database schemas. The $DB$ macro is for the level above the schema level.
To get the current schema name within a snippet, you can use DATABASE() built-in MySQL function.
|
|
Wed Jun 16, 2010 9:51 am |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|