Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
laziness, impatience, and hubris
 
PerlMonks  

Re: DBD::mysql barfs

by olly (Scribe)
on May 20, 2001 at 23:09 UTC ( [id://81876]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to DBD::mysql barfs

I am not shure if the missing : is the problem because I get a syntax error when I leave it out. Here is the mysql code that does the job for me
$dsn = "DBI:$db_driver:database=$db_database;host=$db_hostname;port=$d +b_port"; $dbh = DBI->connect($dsn, $db_user, $db_password) || die "cannot conne +ct: " . $DBI::errstr; $sth = $dbh->prepare(qq` insert into solid_gear (product_name, product_publisher, product_price, product_url, product_ +picture_name, url1, url2, url3, url4, name1, name2, name3, name4, pro +duct_review, date, author_id) values ('$product_name','$product_publisher','$product_price','$product_url', +'$product_picture_name','$url1','$url2','$url3','$url4','$name1','$na +me2','$name3','$name4','$product_review','$date','$author_id') `) || die "Cannot prepare: " . $dbh->errstr(); $sth->execute() || die "Cannot execute: " . $sth->errstr(); $sth->finish(); $dbh->disconnect;
I hope this is any help (just a quick cut and paste)

Imagination is more important then knowledge -Einstein-

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://81876]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.