Gossamer Forum
Home : General : Databases and SQL :

Adding Table Prefix to mysql call - perl

Quote Reply
Adding Table Prefix to mysql call - perl
Hi All

Here's my situation. I'd like to add a table prefix to all the mysql calls in one of my perl scripts. I'm gonna put the following in the config file, and then make the adjustments:

Quote:
$dbprefix = 'fred_';

The problem for me is how to add it to the calls in the scripts. For example, is adding $dbprefix as simple as the following, or should I have some quotes or something in there:

Code:
$statement = 'SELECT * FROM
$dbprefixusers WHERE username = ?';

Thanks a bunch Smile

------------------------------------------

Last edited by:

DogTags: Feb 7, 2003, 6:36 AM
Subject Author Views Date
Thread Adding Table Prefix to mysql call - perl DogTags 8386 Feb 7, 2003, 6:35 AM
Post Re: [DogTags] Adding Table Prefix to mysql call - perl
DogTags 7947 Feb 9, 2003, 10:54 AM
Thread Re: [DogTags] Adding Table Prefix to mysql call - perl
Alex 8001 Feb 9, 2003, 1:54 PM
Post Re: [Alex] Adding Table Prefix to mysql call - perl
DogTags 7955 Feb 9, 2003, 3:43 PM