MySQL Forums
Forum List  »  Perl

fetch a problem to insert values in perl programming
Posted by: arupratan biswas
Date: May 18, 2005 04:28AM

when i insert values through mysql command by html page in my table new_user then i fetch some error just like that- "you have an error in your sql syntex near ''',''>'' at line--->
$dbh = DBI->connect("dbi:mysql:test:192.168.0.95","bobby","bobby");


$sqlstatement="INSERT INTO new_user (emp_id,emp_name,emp_add,city,zip_code,dob,phone) VALUES('$emp_id','$emp_name','$emp_add','$city',$zip_code,'$dob','$phone')";
$sth = $dbh->prepare($sqlstatement);
$sth->execute ||
die "Could not execute SQL statement ... maybe invalid?";

could not exequte sql statement......maybe invalid.
please help me out from that problem.
arup ratan

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.