Hi,
just installed GForum , now I wanted to use a global that I already use in Links SQL to display the number of total links in the database.
Now the problem is that the tables for GForum and Links have different prefixes, so I can't use the global from Links SQL without modifying it a bit.
In the documentation I found
$db->prefix("foo");
to get the current prefix:
my $prefix = $db->prefix;
What this will do is prepend 'foo' to the beginning of every table name.
I tried that to set the table prefix according to my Links tables, but it won't work. Instead I get an error.
Can someone please tell me how to get data from tables with a different prefix?
Thank you.
Andreas
-------------------------------------------------
http://www.archaeologie-online.de
just installed GForum , now I wanted to use a global that I already use in Links SQL to display the number of total links in the database.
Now the problem is that the tables for GForum and Links have different prefixes, so I can't use the global from Links SQL without modifying it a bit.
In the documentation I found
Quote:
To set a prefix: $db->prefix("foo");
to get the current prefix:
my $prefix = $db->prefix;
What this will do is prepend 'foo' to the beginning of every table name.
I tried that to set the table prefix according to my Links tables, but it won't work. Instead I get an error.
Can someone please tell me how to get data from tables with a different prefix?
Thank you.
Andreas
-------------------------------------------------
http://www.archaeologie-online.de