On Wed, Aug 30, 2000 at 07:37:39PM -0500, William Jensen wrote:
> Greetings,
> 
> I currently work for a company doing database development with MS SQL Server
> and VisualBasic.  I'd like to branch out a little bit and learn some linux
> based solutions.  Is MySQL & C++ a good combination for doing some home
> learning/experimenting?

i use perl, the swiss-army chainsaw, and its database-independent modules
via 'DBI'. i connect via DBD::Pg to postgres, and via DBD::mysql to get to
mysql.

my website hits are tracked by mysql, and i use posgresql for other
behind-the-scenes stuff, all connected via perl and DBI.

off the top of my head--

        use DBI;
        $dbh = DBI->connect($DATABASE_SELECTOR_STRING, $USER, $PASSWD);

        $sth = $dbh->prepare(<<"A_QUERY");
SELECT
        fname, lname, joined,
        current_date - joined + 1
FROM
        $DATABASE_NAME
WHERE
        $SEEKFIELD = ?
A_QUERY

        $sth->execute($SEEK_VAL);
        #       while(@v = $sth->fetchrow_array()) {
        #               &do_something(@v);
        #       }
        $results = $sth->fetchall_hashref();

of course, for really high-volume time-saving execution, clean C
code should always outrun good perl code for even the slightest
complexity -- but the main advantage of perl is a quick development
cycle (and it optimizes quite well, for an interpreted language).

perl/DBI (mysql, oracle, postgres, msql, nosql, csv, ad nauseum)...
i highly recommend it.

Reply via email to