From: Thimble Smith Date: March 26 1999 12:44am Subject: Re: CANT FIND FILE AND MYSTERY ERROR List-Archive: http://lists.mysql.com/mysql/996 Message-Id: <19990325174449.X5953@desert.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii I see two problems. If they're cut-n-paste errors, please let me know what the program really has. my $db_name = ''badone'; I'm going to assume this one is a cut-and-paste error, because your script wouldn't even compile if you had that extra quote. &dbase_query ( $dbase_handle, "INSERT INTO badone ( name, email, remote_address, message ) " . "VALUES ( \"$name\", \"$email\", \"$remote_addr\", \"$message\" )" ); I think the problem here is that you've got "INSERT INTO badone", but there isn't any table called badone. The database is badone, the table is email_info. It should be "INSERT INTO email_info". But this also seems to be a cut-and-paste error, because in your previous e-mail you said that the error mentions the email_info table. But the script you sent just now doesn't mention that name anywhere! So please make sure that you're using the database name when you connect, and table names when you are performing queries. If you think you're doing everything correctly, please post the actual code that you're running, and be careful to paste it in correctly. Also please post how you're running the script and exactly what error message you get. Make sure that the things you post are actually what you're using, because it only confuses things if you copy the wrong things! Thanks again, Tim On Thu, Mar 25, 1999 at 04:22:37PM -0700, Administrator wrote: > my $dbase = 'mysql'; > my $comp_name = 'mothership.hanzo.net'; > my $db_name = ''badone'; > my $user_id = 'baddude'; > > my $dbase_handle = > &dbase_connect ( $dbase, $db_name, $comp_name, $user_id ); > > &dbase_query ( > $dbase_handle, > "INSERT INTO badone ( name, email, remote_address, message ) " . > "VALUES ( \"$name\", \"$email\", \"$remote_addr\", \"$message\" )" > ); > > sub dbase_query { > my ( $handle, $query ) = @_; > > $sth = $handle->prepare($query); > if ( !$sth->execute ) { print "Error:" . $sth->errstr . "\n"; } > > if ( $query =~ /^SELECT/ ) { > return $sth; > } > > $sth->finish; > }