<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1000694" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1000694</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/perl-mysql-can-someone-gimme-quick#comment-1003011</link>
    <description> &lt;p&gt;Dass:&lt;br /&gt;
Sorry I did not get back to you until now. I have been swamped. I will be honest here, I did not test your script out, but I would drop the double $dbh= statements and also specify the columns you are dropping the values into:&lt;/p&gt;
&lt;p&gt;$database=&amp;quot;databasename&amp;quot;;&lt;br /&gt;
$user=&amp;quot;user&amp;quot;;&lt;br /&gt;
$password=&amp;quot;password&amp;quot;;&lt;br /&gt;
$tablename= &amp;quot;nameoftable&amp;quot;;&lt;/p&gt;
&lt;p&gt;#Connect to the MySQL server&lt;br /&gt;
$dbh = Mysql-&amp;gt;connect(undef, $database, $user, $password);&lt;/p&gt;
&lt;p&gt;#Prepare the sql statement&lt;br /&gt;
$insert_statement =&amp;quot;$dbh-&amp;gt;prepare(qq(insert into $tablename (fieldname_1, fieldname_2, fieldname3, fieldname4) values(&#039;$file&#039;,&#039;$path&#039;,&#039;$size&#039;,&#039;$url&#039;)))&amp;quot;;&lt;br /&gt;
#Execute the sql statement&lt;br /&gt;
$sth = $dbh-&amp;gt;execute;&lt;br /&gt;
$sth-&amp;gt;finish;&lt;/p&gt;
&lt;p&gt;You have probably got it sorted out by now. If not, let me know and I will try to test the code. As I said in my first response. I have had a h--l of a time getting the syntax down myself.&lt;/p&gt;
&lt;p&gt;Good Luck!&lt;/p&gt;
&lt;p&gt;----------&lt;br /&gt;
Alan Izat&lt;/p&gt;
 </description>
     <pubDate>Tue, 29 Jun 1999 20:01:00 +0000</pubDate>
 <dc:creator>tazman</dc:creator>
 <guid isPermaLink="false">comment 1003011 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/perl-mysql-can-someone-gimme-quick#comment-1003008</link>
    <description> &lt;p&gt;Here is some code I use:&lt;/p&gt;
&lt;p&gt;$table = &amp;quot;table_name&amp;quot;;&lt;br /&gt;
$database = &amp;quot;database_name&amp;quot;;&lt;br /&gt;
$data_source = &amp;quot;dbi:mysql:database_name:localhost:&amp;quot;;&lt;/p&gt;
&lt;p&gt;# connect to webserver database&lt;br /&gt;
$dbh = DBI-&amp;gt;connect($data_source)&lt;br /&gt;
or &amp;amp;error_handler(&amp;quot;database_connect&amp;quot; ) ;&lt;/p&gt;
&lt;p&gt;##sql statement to select appropriate records&lt;br /&gt;
$statement = qq(select distinct fieldname_1,fieldname_2 from table_name where fieldname_to_match like &#039;match_value&#039;); &lt;/p&gt;
&lt;p&gt;my $sth = $dbh-&amp;gt;prepare($statement) or &amp;amp;error(&#039;database_prepare&#039; );&lt;br /&gt;
 unless($sth-&amp;gt;execute) {&lt;br /&gt;
  &amp;amp;error_handler(&amp;quot;database_prepare&amp;quot; ) ;&lt;br /&gt;
 }&lt;br /&gt;
  my($fieldname_1,$fieldname_2);&lt;br /&gt;
$sth-&amp;gt;bind_columns(undef, \$fieldname_1, \$fieldname_2);&lt;br /&gt;
   $sth-&amp;gt;execute;&lt;br /&gt;
   while($sth-&amp;gt;fetchrow_arrayref) {&lt;br /&gt;
   }&lt;/p&gt;
&lt;p&gt;# a normal select/execute/fetch sequence&lt;br /&gt;
$statement = qq{INSERT INTO other_table ( fieldname_1, fieldname_2, other_fieldname3, other_fieldname4 ) VALUES( &#039;$fieldname_1&#039;,&#039;$fieldname_2&#039;,&#039;$other_fieldname3&#039;,&#039;$other_fieldname4&#039;)};&lt;br /&gt;
$sth = $dbh-&amp;gt;prepare($statement);&lt;br /&gt;
 $sth-&amp;gt;execute&lt;br /&gt;
 or &amp;amp;error(print &amp;quot;Unable to execute $statement&amp;quot;, $dbh-&amp;gt;errstr);&lt;/p&gt;
&lt;p&gt;# close the open statement&lt;br /&gt;
$sth-&amp;gt;finish;&lt;/p&gt;
&lt;p&gt;If you find a good source of example code, please let me know. I have had a H--l of a time trying to get the syntax down.&lt;/p&gt;
&lt;p&gt;Hope it helps!&lt;/p&gt;
&lt;p&gt;----------&lt;br /&gt;
Alan Izat&lt;/p&gt;
 </description>
     <pubDate>Thu, 24 Jun 1999 20:21:00 +0000</pubDate>
 <dc:creator>tazman</dc:creator>
 <guid isPermaLink="false">comment 1003008 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/perl-mysql-can-someone-gimme-quick#comment-1003009</link>
    <description> &lt;p&gt;Thanks! So does this look like it will work?&lt;/p&gt;
&lt;p&gt;$database=&amp;quot;databasename&amp;quot;;&lt;br /&gt;
$user=&amp;quot;user&amp;quot;;&lt;br /&gt;
$password=&amp;quot;password&amp;quot;;&lt;br /&gt;
$tablename= &amp;quot;nameoftable&amp;quot;;&lt;/p&gt;
&lt;p&gt;#Connect to the MySQL server&lt;br /&gt;
$dbh = Mysql-&amp;gt;connect(undef, $database, $user, $password);&lt;br /&gt;
$dbh-&amp;gt;selectdb($database);&lt;/p&gt;
&lt;p&gt;#Prepare the sql statement&lt;br /&gt;
$insert_statement =&amp;quot;$dbh-&amp;gt;prepare(qq(insert into $tablename values(&#039;$file&#039;,&#039;$path&#039;,&#039;$size&#039;,&#039;$url&#039;)))&amp;quot;;&lt;br /&gt;
#Execute the sql statement&lt;br /&gt;
$sth = $dbh-&amp;gt;query($insert_statement);&lt;br /&gt;
mysql_close()&lt;br /&gt;
}&lt;/p&gt;
 </description>
     <pubDate>Thu, 24 Jun 1999 20:13:00 +0000</pubDate>
 <dc:creator>Dass</dc:creator>
 <guid isPermaLink="false">comment 1003009 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/perl-mysql-can-someone-gimme-quick#comment-1003010</link>
    <description> &lt;p&gt;Thanks! So does this look like it will work?&lt;/p&gt;
&lt;p&gt;$database=&amp;quot;databasename&amp;quot;;&lt;br /&gt;
$user=&amp;quot;user&amp;quot;;&lt;br /&gt;
$password=&amp;quot;password&amp;quot;;&lt;br /&gt;
$tablename= &amp;quot;nameoftable&amp;quot;;&lt;/p&gt;
&lt;p&gt;#Connect to the MySQL server&lt;br /&gt;
$dbh = Mysql-&amp;gt;connect(undef, $database, $user, $password);&lt;br /&gt;
$dbh-&amp;gt;selectdb($database);&lt;/p&gt;
&lt;p&gt;#Prepare the sql statement&lt;br /&gt;
$insert_statement =&amp;quot;$dbh-&amp;gt;prepare(qq(insert into $tablename values(&#039;$file&#039;,&#039;$path&#039;,&#039;$size&#039;,&#039;$url&#039;)))&amp;quot;;&lt;br /&gt;
#Execute the sql statement&lt;br /&gt;
$sth = $dbh-&amp;gt;query($insert_statement);&lt;br /&gt;
mysql_close()&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;----------&lt;br /&gt;
[Dass]&lt;br /&gt;
[Email:robp@netlimit.com]-[ICQ:16560402]&lt;/p&gt;
 </description>
     <pubDate>Thu, 24 Jun 1999 20:13:00 +0000</pubDate>
 <dc:creator>Dass</dc:creator>
 <guid isPermaLink="false">comment 1003010 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
