[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

RE: Msql question



Check your web server logs.

Normally use should use the DBI module:

use DBI;
my $dbh = DBI->connect("DBI:msql:forum","server","password") or die "Can't
connect to database: DBI->errstr\n";

the syntax for the DBI module is pretty close to the msql module if not the
same (it was in hamm.)

-----Original Message-----
From: Pete Templin [mailto:templin@urdirect.net]
Sent: Tuesday, December 14, 1999 2:57 PM
To: debian-isp@lists.debian.org
Subject: Msql question



Anyone familiar with Msql and accessing it via the Perl module?

Any idea why the following line isn't creating anything in my database

#!/usr/bin/perl

use Msql;
$databasename = "vendor1";

$dbh = Msql->connect("",$databasename);

$dbitem_add = $dbh->query("insert into products (vendpart, datestamp,
brand, manpart, descript, resaleprice, whlslprice, listprice, inventory)
values ($product_info[$vendpart], $date_stamp, $product_info[$brand],
$product_info[$manpart], $product_info [$descript],
$product_info[$resellprc], $product_info[$whlslprc],
$product_info[$listprc], $product_info[$inventory]");


Assuming of course that @product_info is properly stuffed with data, and
that the index references do exist properly.

Any insights are ever so welcome - I'm cutting lots of new teeth on this
crazy project.

Pete

--
Peter J. Templin, Jr., CCNA
Systems and Networks Administrator

On-Line Internet Services - URDirect.net
A division of Global On-Line Computers
2414 Babcock Rd. Suite 106		templin@urdirect.net
San Antonio, TX 78229			(210)692-9911


--
To UNSUBSCRIBE, email to debian-isp-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact
listmaster@lists.debian.org


Reply to: