<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>MySQL Forums - Perl</title>
        <description>Forum for MySQL and Perl.</description>
        <link>http://forums.mysql.com/list.php?51</link>
        <lastBuildDate>Thu, 20 Jun 2013 00:53:29 +0000</lastBuildDate>
        <generator>Phorum 5.2.19</generator>
        <item>
            <guid>http://forums.mysql.com/read.php?51,588825,588825#msg-588825</guid>
            <title>update DBD::mysql error (no replies)</title>
            <link>http://forums.mysql.com/read.php?51,588825,588825#msg-588825</link>
            <description><![CDATA[ i upgrade DBD::mysql from 3.0007 to 4.023 ,get an error,anyone know how to solve this problem? thanks a lot<br />
<br />
# find /usr -name 'mysql_config'<br />
/usr/lib64/mysql/mysql_config<br />
/usr/local/mysql-5.5.30-linux2.6-x86_64/bin/mysql_config<br />
/usr/local/mysql-5.1.63/bin/mysql_config<br />
/usr/local/mysql-cluster-gpl-7.1.22/bin/mysql_config<br />
/usr/bin/mysql_config<br />
/usr/lib/mysql/mysql_config<br />
<br />
i use mysql5.5 so<br />
# perl Makefile.PL --mysql_config=/usr/local/mysql-5.5.30-linux2.6-x86_64/bin/mysql_config<br />
<br />
]# make test<br />
PERL_DL_NONLAZY=1 /usr/bin/perl &quot;-MExtUtils::Command::MM&quot; &quot;-e&quot; &quot;test_harness(0, 'blib/lib', 'blib/arch')&quot; t/*.t<br />
t/00base....................ok 1/6<br />
t/00base....................NOK 2#   Failed test 'use DBD::mysql;'<br />
#   at t/00base.t line 21.<br />
#     Tried to use 'DBD::mysql'.<br />
#     Error:  Can't load '/root/DBD-mysql-4.023/blib/arch/auto/DBD/mysql/mysql.so' for module DBD::mysql: libmysqlclient.so.18: cannot open shared object file: No such file or directory at /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/DynaLoader.pm line 230.<br />
#  at (eval 7) line 2<br />
# Compilation failed in require at (eval 7) line 2.<br />
# BEGIN failed--compilation aborted at (eval 7) line 2.<br />
FAILED--Further testing stopped: Unable to load DBD::mysql<br />
make: *** [test_dynamic] Error 9<br />
<br />
# make install<br />
Files found in blib/arch: installing files in blib/lib into architecture dependent library tree<br />
Writing /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/auto/DBD/mysql/.packlist<br />
Appending installation info to /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/perllocal.pod<br />
[root@CHS118 DBD-mysql-4.023]# perl -MDBD:mysql<br />
syntax error at - line 0, near &quot;use DBD:&quot;<br />
Execution of - aborted due to compilation errors.<br />
<br />
# perl -MDBD::mysql<br />
Can't load '/usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/auto/DBD/mysql/mysql.so' for module DBD::mysql: libmysqlclient.so.18: cannot open shared object file: No such file or directory at /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/DynaLoader.pm line 230.<br />
 at - line 0<br />
Compilation failed in require.<br />
BEGIN failed--compilation aborted.]]></description>
            <dc:creator>h h</dc:creator>
            <category>Perl</category>
            <pubDate>Wed, 19 Jun 2013 06:02:08 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?51,579346,579346#msg-579346</guid>
            <title>Using DBI for MySQL metadata (no replies)</title>
            <link>http://forums.mysql.com/read.php?51,579346,579346#msg-579346</link>
            <description><![CDATA[ I'm unable to get the information I need from reading the CPAN DBI documentation, and it was suggested I post here for help specifically for MySQL.  (FYI I'm using Perl 5.10 and MySQL 5.5/5.6).<br />
<br />
I can't seem to find a list of descriptions of the info that's being returned from this:<br />
<br />
    my $sth_column_info = $dbh-&gt;column_info( $catalog, $schema, $table, undef );<br />
    my $aoa_ref = $sth_column_info-&gt;fetchall_arrayref;<br />
<br />
There are 30-some elements in the array for each column.  The meaning of some is obvious, the meaning of others is not.<br />
<br />
It's also not clear to me how to express the arguments to fetchall_arrayref() to ask for only certain information.<br />
<br />
And there are some numeric codes that aren't meaningful without a key.<br />
<br />
Is there some documentation, specifically aimed at MySQL, on how to use the DBI for obtaining metadata?]]></description>
            <dc:creator>CHap Harrison</dc:creator>
            <category>Perl</category>
            <pubDate>Sun, 17 Feb 2013 19:47:23 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?51,578414,578414#msg-578414</guid>
            <title>Select query returns false result. (1 reply)</title>
            <link>http://forums.mysql.com/read.php?51,578414,578414#msg-578414</link>
            <description><![CDATA[ eg: <br />
<br />
Table : user<br />
column : user_id (type is int)<br />
<br />
SELECT * FROM user WHERE user_id = '10xyz' is giving same result of<br />
SELECT * FROM user WHERE user_id = '10'<br />
<br />
<br />
The input value is not integer but not giving an error in this case.]]></description>
            <dc:creator>Tom Thomas</dc:creator>
            <category>Perl</category>
            <pubDate>Tue, 05 Feb 2013 03:03:01 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?51,578268,578268#msg-578268</guid>
            <title>MySql, Perl, and HTML Update function not working (6 replies)</title>
            <link>http://forums.mysql.com/read.php?51,578268,578268#msg-578268</link>
            <description><![CDATA[ Hello,<br />
I used a guide that I found that was written by Tony Darnell regarding using MySql, Perl, and a little HTML to create, update, and delete database records. Everything works perfectly, except for the UPDATE functionality. Is there anything explicitly wrong with the following lines<br />
<br />
$serial = $formdata{'serial'};<br />
$name_first = $formdata{'name_first'};<br />
$name_last = $formdata{'name_last'};<br />
$address_01 = $formdata{'address_01'};<br />
$address_02 = $formdata{'address_02'};<br />
$address_city = $formdata{'address_city'};<br />
$address_state = $formdata{'address_state'};<br />
$address_postal_code = $formdata{'address_postal_code'};<br />
<br />
$dbh = ConnectToMySql($Database);<br />
<br />
$query = &quot;update address set name_first = '$name_first', name_last = '$name_last', address_01 = '$address_01', address_02', address_city = '$address_city', address_state = '$address_state', address_postal_code = '$address_postal_code' where serial = '$serial'&quot;;<br />
<br />
$sth = $dbh-&gt;prepare($query);<br />
<br />
$sth-&gt;execute();<br />
<br />
$dbh-&gt;disconnect;<br />
<br />
<br />
When I takek out the $serial and enter in a manual value in the $query line, it works. So something is not kosher with having it grab that value on its own. I am a complete MySql and Perl n00b btw, so I apologize right off the bat if i misunderstand something or am missing something easy. Thanks for the help and let me know if you need any other info.]]></description>
            <dc:creator>adam gruber</dc:creator>
            <category>Perl</category>
            <pubDate>Tue, 05 Feb 2013 14:51:14 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?51,575384,575384#msg-575384</guid>
            <title>Mysql query produces different results for different users (3 replies)</title>
            <link>http://forums.mysql.com/read.php?51,575384,575384#msg-575384</link>
            <description><![CDATA[ Hello,<br />
<br />
On my website I have a form with 6 fields the user fills in order to retrieve desired records from database.<br />
The user can leave all fields empty, in which case all the records are displayed.<br />
Alternetively, he can fill any combination of fields and the mysql query will be built dynamically based on the user's choices.<br />
<br />
When I click the submit button, it works fine, no matter what fields combination I fill in the form.<br />
<br />
But, I have a problem with a user, actually a company with a network of 20 users connecting online using Sbox (router).<br />
When they leave all the above form fields empty, they get the recordset and it's working fine. But, when they fill any of the form fields (any number of fields in any combination), they get an empty recordset. No errors but no records.<br />
<br />
I have no idea what's the reason for this.<br />
<br />
If they get all the records when the form fields left empty, it means they connect successfully to the database. Also, the PHP code is OK, after all I tested it and it worked (and still working) fine.<br />
So if there is no connection problem and no code problem, what can the problem be?<br />
<br />
If it is relevant, the difference between their computers and mine:<br />
They use ie8 (I use ie9)<br />
Their OS: Windows XP (mine Windows 7)<br />
Om all stations they have NOD32 antivirus. (I have a different one)<br />
<br />
I don't think any of the above is relevant, but because the situation is so <br />
unexpected so I don't know where to look for the solution, I provide all details....<br />
<br />
Any ideas?<br />
<br />
Thanks for your help!]]></description>
            <dc:creator>Amir Weinberger</dc:creator>
            <category>Perl</category>
            <pubDate>Sun, 09 Dec 2012 19:45:19 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?51,574418,574418#msg-574418</guid>
            <title>Apologies - not perl (no replies)</title>
            <link>http://forums.mysql.com/read.php?51,574418,574418#msg-574418</link>
            <description><![CDATA[ Paul]]></description>
            <dc:creator>Paul A</dc:creator>
            <category>Perl</category>
            <pubDate>Thu, 22 Nov 2012 22:20:33 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?51,574168,574168#msg-574168</guid>
            <title>Get data from Mysql with php (1 reply)</title>
            <link>http://forums.mysql.com/read.php?51,574168,574168#msg-574168</link>
            <description><![CDATA[ Hello all,<br />
<br />
I have a Mysql database with 3 column ID, Name and Image.<br />
<br />
The Image is store in the for of:<br />
[{&quot;index&quot;:1,&quot;image&quot;:&quot;value.jpg&quot;,&quot;thumbnail&quot;:&quot;value_t.jpg&quot;}]<br />
<br />
I want to get the value of &quot;image&quot; with Php, what just I do? plz Help]]></description>
            <dc:creator>Jack Rima</dc:creator>
            <category>Perl</category>
            <pubDate>Tue, 20 Nov 2012 12:28:41 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?51,574000,574000#msg-574000</guid>
            <title>UPDATE ... WHERE writing a new line (4 replies)</title>
            <link>http://forums.mysql.com/read.php?51,574000,574000#msg-574000</link>
            <description><![CDATA[ I am having trouble converting valid MySQL command line to Perl.  This works:<br />
<br />
mysql&gt; UPDATE control_number SET ctrlnum=714568 WHERE id = 1;<br />
Query OK, 1 row affected (0.00 sec)<br />
Rows matched: 1  Changed: 1  Warnings: 0<br />
<br />
mysql&gt; SELECT *  FROM control_number;<br />
+---------+------+<br />
| ctrlnum | id   |<br />
+---------+------+<br />
|  714568 |    1 |<br />
+---------+------+<br />
<br />
But when I run it in a production .pl (increment by 1 every time the script is called), it writes a new line:<br />
<br />
        my $sth = $dbh-&gt;prepare(&quot;UPDATE control_number SET ctrlnum='$max' WHERE id = 1;&quot;);<br />
        $sth-&gt;execute;<br />
+---------+------+<br />
| ctrlnum | id   |<br />
+---------+------+<br />
|  714568 |    1 |<br />
|  714569 | NULL |<br />
+---------+------+<br />
<br />
Cane somebody please help? Many thanks.  -- Paul]]></description>
            <dc:creator>Paul A</dc:creator>
            <category>Perl</category>
            <pubDate>Mon, 19 Nov 2012 20:07:15 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?51,571841,571841#msg-571841</guid>
            <title>Retrieving the default database name (7 replies)</title>
            <link>http://forums.mysql.com/read.php?51,571841,571841#msg-571841</link>
            <description><![CDATA[ Setting the default database is really simple and learning how to do it is simple too!<br />
<br />
But it is really frustrating, and so far I was unsuccessful, to find how to retrieve the default database name.<br />
<br />
Is there a &quot;SELECT&quot; way to do it? Any other way???<br />
<br />
Thanks]]></description>
            <dc:creator>Meir Guttman</dc:creator>
            <category>Perl</category>
            <pubDate>Tue, 23 Oct 2012 20:34:21 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?51,567053,567053#msg-567053</guid>
            <title>Perl script  Mysql update help (2 replies)</title>
            <link>http://forums.mysql.com/read.php?51,567053,567053#msg-567053</link>
            <description><![CDATA[ Ok I give up, i've read loads of posts I just cannot get this snippet work with variables, works fine if I use manual values.... Please help <br />
<br />
$sql = 'UPDATE snmpcol SET sysUpTime = &quot;$snmpresult&quot; WHERE IP = &quot;192.168.1.60&quot;';<br />
	$sth = $dbh-&gt;prepare($sql) or die &quot;Cannot prepare: &quot; . $dbh-&gt;errstr();<br />
	$sth-&gt;execute() or die &quot;Cannot execute: &quot; . $sth-&gt;errstr();<br />
	$sth-&gt;finish();<br />
<br />
Thanks in advance chaps]]></description>
            <dc:creator>Neil Bernard</dc:creator>
            <category>Perl</category>
            <pubDate>Tue, 04 Sep 2012 18:27:06 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?51,566152,566152#msg-566152</guid>
            <title>DB connect error (no replies)</title>
            <link>http://forums.mysql.com/read.php?51,566152,566152#msg-566152</link>
            <description><![CDATA[ Hello all,<br />
<br />
I was wondering what this problem was.  I write a simple script after installing MySQL, DBD-mysql-4.021, DBI-1.622, and Data-ShowTable-3.3.<br />
<br />
MySQL version: mysql  Ver 14.14 Distrib 5.5.27, for osx10.6 (i386) using readline 5.1<br />
<br />
The script was:<br />
<br />
#!/usr/bin/perl<br />
<br />
use strict;<br />
use DBI;<br />
use warnings;<br />
<br />
# Connect to the database.<br />
my $dbh = DBI-&gt;connect(&quot;DBI:mysql:database=rendb:localhost&quot;,<br />
                         &quot;renadm&quot;, &quot;wiseman&quot;,<br />
                         {'RaiseError' =&gt; 1, PrintError =&gt; 0, AutoCommit =&gt; 1});<br />
<br />
print $dbh, &quot;\n&quot;;<br />
<br />
# Disconnect from the database.<br />
$dbh-&gt;disconnect();<br />
<br />
exit 0;<br />
<br />
<br />
<br />
<br />
The error was:<br />
<br />
<br />
dyld: lazy symbol binding failed: Symbol not found: _mysql_init<br />
  Referenced from: /Library/Perl/5.12/darwin-thread-multi-2level/auto/DBD/mysql/mysql.bundle<br />
  Expected in: flat namespace<br />
<br />
dyld: Symbol not found: _mysql_init<br />
  Referenced from: /Library/Perl/5.12/darwin-thread-multi-2level/auto/DBD/mysql/mysql.bundle<br />
  Expected in: flat namespace<br />
<br />
Trace/BPT trap: 5<br />
<br />
<br />
Perl can't find _mysql_init?  After all that installation?  I bet this problem is simple.  I just don't have the experience yet.  Any clues?<br />
<br />
Thanks.<br />
<br />
Paul Brown]]></description>
            <dc:creator>Paul Brown</dc:creator>
            <category>Perl</category>
            <pubDate>Fri, 24 Aug 2012 21:45:05 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?51,563423,563423#msg-563423</guid>
            <title>install DBD:mysql without mysql (no replies)</title>
            <link>http://forums.mysql.com/read.php?51,563423,563423#msg-563423</link>
            <description><![CDATA[ Hi,<br />
I'd like to install DBD::mysql to connect to a mysql instance on an other server.<br />
I cannot install mysql locally.<br />
Can someone advice which files I need (for installation / execution) or<br />
how to achieve that?<br />
<br />
RHEL5 / mysql 5.5.8<br />
<br />
Thanks a lot!]]></description>
            <dc:creator>F L</dc:creator>
            <category>Perl</category>
            <pubDate>Tue, 31 Jul 2012 12:09:11 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?51,562692,562692#msg-562692</guid>
            <title>converting latin1_swedish_ci &quot;text&quot; column data to utf8_bin (1 reply)</title>
            <link>http://forums.mysql.com/read.php?51,562692,562692#msg-562692</link>
            <description><![CDATA[ Hi,<br />
<br />
I have seen several discussions on-line about converting existing databases and tables from latin1_* to utf8 using ALTER TABLE commands.  I can't do that.<br />
<br />
The MySQL instance I have inherited has the default latin1_swedish_ci encoding.  All the existing databases and tables are in that encoding.<br />
<br />
I am in the process of making major modifications to some of the existing apps and want to move to utf8 encoding. I have created the tables with the new encoding and I want to copy the old data from the old latin1 tables into the new tables.  i will then setup an AFTER TRIGGER on the old tables to push any new items that come in to the new tables.<br />
<br />
The question is how do I do the conversion &quot;on the fly&quot;?  I know about the CONVERT() and CAST() functions.<br />
<br />
I am mainly having issues with an old &quot;TEXT&quot; column that is latin1_swedish_ci.  I am doing the following:<br />
<br />
<pre class="bbcode">
SELECT * FROM the old table

FOREACH row
    INSERT INTO new table ...
    VALUES (..., CONVERT(old_text_col USING utf8), ...)
END FOR</pre>
<br />
but that column in the new table always reports the column contents as a BLOB.<br />
<br />
I do not see a charset option in DBI.  What am I missing?]]></description>
            <dc:creator>7 reeds</dc:creator>
            <category>Perl</category>
            <pubDate>Wed, 25 Jul 2012 19:10:21 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?51,561922,561922#msg-561922</guid>
            <title>SQL_CALC_FOUND_ROWS / found_rows() vs loop counter (no replies)</title>
            <link>http://forums.mysql.com/read.php?51,561922,561922#msg-561922</link>
            <description><![CDATA[ Hi,<br />
<br />
&lt;edit&gt;I am using perl 5.8.8, MySQL 5.1.51 and am connecting to the db via DBI-&gt;connect_cached() &lt;edit&gt;<br />
<br />
I am experimenting with using SQL_CALC_FOUND_ROWS and FOUND_ROWS() to tell me the number of items returned from a query with a LIMIT clause.  I have an ever growing table with (currently) 348735 records -- based on a SELECT count(*) FROM table.  As i type this that number may grow by a few or a dozen.<br />
<br />
Last evening I was running a perl script to test the numbers and issued the query:<br />
<br />
<pre class="bbcode">
$tmp = &lt;&lt;EOF;
SELECT SQL_CALC_FOUND_ROWS
    *
FROM
    my_table
ORDER BY
    date ASC
LIMIT 0, 999999999
EOF

$sth = &amp;returnQuery($DBH, $tmp);
for ($i = 0; $row = $sth-&gt;fetchrow_hashref; $i++) {
    if ($i &amp;&amp; ($i % 2000) == 0) {
        print STDOUT &quot;\tSleeping after $i\n&quot;;
        sleep 2;
    }
}
$sth-&gt;finish;
print STDOUT &quot;Number of rows operated on = $i\n&quot;;

$sth = &amp;returnQuery($DBH, &quot;SELECT FOUND_ROWS()&quot;);
@cnt = $sth-&gt;fetchrow_array;
$sth-&gt;finish;
print STDOUT &quot;returned rows = $cnt[0]\n&quot;;</pre>
<br />
The last time i ran this yesterday it returned:<br />
<br />
<pre class="bbcode">
# ./copyDB
        Sleeping after 2000
        Sleeping after 4000
        Sleeping after 6000
        Sleeping after 8000
        Sleeping after 10000
[...]
        Sleeping after 344000
        Sleeping after 346000
        Sleeping after 348000
Number of rows operated on = 348690
returned rows = 279260</pre>
<br />
So, last night there were a few less records in the table than there are now.  That is to be expected.  The question is why is the number returned by FOUND_ROWS() so much lower than the loop counter?<br />
<br />
I figure that I did something wrong but I can't see it yet.<br />
<br />
ideas?<br />
<br />
Seven]]></description>
            <dc:creator>7 reeds</dc:creator>
            <category>Perl</category>
            <pubDate>Wed, 18 Jul 2012 16:46:31 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?51,558498,558498#msg-558498</guid>
            <title>install_driver(mysql) failed (no replies)</title>
            <link>http://forums.mysql.com/read.php?51,558498,558498#msg-558498</link>
            <description><![CDATA[ Please help!<br />
<br />
I have DBD::mysql installed, and all the files are in the right places, but when I run the program, I receive this error:<br />
<br />
install_driver(mysql) failed: Can't load 'C:/wamp/bin/perl/site/lib/auto/DBD/mysql/mysql.dll' for module DBD::mysql: load_file:The specified module could not be found at C:/wamp/bin/perl/lib/DynaLoader.pm line 191, &lt;FILE&gt; line 3.<br />
 at (eval 401) line 3.<br />
Compilation failed in require at (eval 401) line 3, &lt;FILE&gt; line 3.<br />
Perhaps a required shared library or dll isn't installed where expected<br />
 at C:/wamp/www/wakaba.pl line 45.<br />
<br />
What's wrong with the program?<br />
<br />
I've using WampServer 2.2 64-bit with Apache 2.4.2 and ActivePerl 5.16.0.]]></description>
            <dc:creator>Frederick Eason</dc:creator>
            <category>Perl</category>
            <pubDate>Sat, 23 Jun 2012 17:24:39 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?51,558039,558039#msg-558039</guid>
            <title>Query for unkown column name (1 reply)</title>
            <link>http://forums.mysql.com/read.php?51,558039,558039#msg-558039</link>
            <description><![CDATA[ Oke here it goes,<br />
i have 2 tables (exchangerate and player)<br />
player has a column called currency<br />
and exchangerate has columns named after those currencies<br />
So what i would like to do is this<br />
<br />
select<br />
   player.name,<br />
   player.currency, (like eur of usd)<br />
   exchangerate.[player.currency] as exchangerate<br />
from<br />
   player<br />
   inner join exchangerate on ( exchangerate.date = DATE(NOW()) )<br />
where<br />
   player.id = 1;<br />
<br />
Giving me the following row<br />
[name]     [currency]     [exchangerate]<br />
John       'usd'          1.2345<br />
<br />
Any help is nice!]]></description>
            <dc:creator>Rene Jaspers</dc:creator>
            <category>Perl</category>
            <pubDate>Sun, 24 Jun 2012 05:04:03 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?51,550030,550030#msg-550030</guid>
            <title>MYSQL and Perl (1 reply)</title>
            <link>http://forums.mysql.com/read.php?51,550030,550030#msg-550030</link>
            <description><![CDATA[ Hello Community ! <br />
<br />
Fist of all, my congratulations for this outstanding forum here.<br />
<br />
And here are my questions:<br />
<br />
I have to do a MYSQL Server in our company for our customer tables. The Server is already working and I have installed a DB and tables in it for testing. <br />
Now my problem is, that I have a list of data which is like this 11111(accountnr);name;street;..... etc. <br />
In my perl script I have to search with the account number, and want to get back the row with the information to have them my perl script. <br />
The Problem is I'm always only getting the account number instead the whole row back. Here is a part of my script:<br />
<br />
if (/^customer\;/)<br />
  {<br />
    $kto = $line[1];<br />
<br />
    $connection1    = &quot;DBI:mysql:testdb&quot;;<br />
    $user           = &quot;XXXXX&quot;;<br />
    $pass	    = &quot;XXXXX&quot;;<br />
<br />
    $dbh = DBI-&gt;connect(&quot;$connection1&quot;,&quot;$user&quot;,&quot;$passwort&quot;) || die &quot;DB connection not made: $DBI_errstr&quot;;<br />
<br />
    $sql = &quot;SELECT $kto FROM mytable&quot;; <br />
    $sth = $dbh-&gt;prepare($sql);<br />
    $sth-&gt;execute();<br />
<br />
    while (@array =$sth-&gt;fetchrow_array())<br />
<br />
    {<br />
                print &quot;*&quot;.$array[0].&quot;*&quot;.$array[9].&quot;*\n&quot;;<br />
    }<br />
<br />
<br />
Thanks for your help.]]></description>
            <dc:creator>Johannes Schuller</dc:creator>
            <category>Perl</category>
            <pubDate>Tue, 05 Jun 2012 17:14:56 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?51,534259,534259#msg-534259</guid>
            <title>how to get database backup (2 replies)</title>
            <link>http://forums.mysql.com/read.php?51,534259,534259#msg-534259</link>
            <description><![CDATA[ I have run this command<br />
<br />
mysqldump -uroot -pv1rtue vtsmain &gt; backfile.sql<br />
this backupfile.sql contain only table backup not function or triggers<br />
i will get all this backup(table data,fun,triggers) what command i will run]]></description>
            <dc:creator>arc v</dc:creator>
            <category>Perl</category>
            <pubDate>Tue, 19 Jun 2012 20:28:05 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?51,526236,526236#msg-526236</guid>
            <title>Perl - Mysql database connection error (1 reply)</title>
            <link>http://forums.mysql.com/read.php?51,526236,526236#msg-526236</link>
            <description><![CDATA[ Hello,<br />
<br />
I am a newbie in MySql database,I have a perl script which connects to mysql database and executes select and update query.Sometimes while running that script,iam getting an warning :<br />
<br />
DBD::mysql::st execute failed: MySQL server has gone away <br />
<br />
and the script fails.<br />
<br />
The database is installed on a linux box and the script is excuted from a windows machine.Also, I tried to connect to the mysql database from command line.I am able to do that w/o any problem.<br />
<br />
<br />
Can anyone help me to find the reason for this failure?<br />
<br />
Thanks,<br />
pooja]]></description>
            <dc:creator>Pooja Nair</dc:creator>
            <category>Perl</category>
            <pubDate>Sat, 21 Apr 2012 05:37:48 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?51,521474,521474#msg-521474</guid>
            <title>Connect to two DB same server... (2 replies)</title>
            <link>http://forums.mysql.com/read.php?51,521474,521474#msg-521474</link>
            <description><![CDATA[ Hello,<br />
<br />
I have an application that uses two databases in the same server that need to share data.<br />
<br />
Is important to have diferent users/password for each DB but i need to cross data between both. This is an example:<br />
<br />
DB1: Table &quot;A&quot; user &quot;aaaa&quot;<br />
DB2: Table &quot;B&quot; user &quot;bbbb&quot;<br />
<br />
SELECT * FROM A INNER JOIN B ON x=x<br />
<br />
I know this can be done using the same user and password but I need to know if is possible using diferent user.<br />
<br />
I am using in my perl application DBI / DBD mysql... if is possible... how can i do connections?<br />
<br />
Thanks in advance]]></description>
            <dc:creator>Enrique Welch</dc:creator>
            <category>Perl</category>
            <pubDate>Mon, 26 Mar 2012 16:16:05 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?51,506541,506541#msg-506541</guid>
            <title>This will give column names only (no replies)</title>
            <link>http://forums.mysql.com/read.php?51,506541,506541#msg-506541</link>
            <description><![CDATA[ A few years ago, someone asked how to get a list of column names of a table and I don't think any of the supplied answers gave just the list, rather than additional information. That's what he was looking for. It can be done by:<br />
<br />
SELECT column_name from information_schema.columns where table_schema = &quot;your_database_name&quot; and table_name = &quot;your_table_name&quot;;<br />
<br />
The old topic as at <a href="http://forums.mysql.com/read.php?51,158277,158277"  rel="nofollow">http://forums.mysql.com/read.php?51,158277,158277</a>]]></description>
            <dc:creator>Dvd Avins</dc:creator>
            <category>Perl</category>
            <pubDate>Thu, 22 Dec 2011 15:39:47 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?51,503902,503902#msg-503902</guid>
            <title>Data gets preloaded upon $sth-&gt;execute? (1 reply)</title>
            <link>http://forums.mysql.com/read.php?51,503902,503902#msg-503902</link>
            <description><![CDATA[ Hi<br />
<br />
I've been working with both DBD::Oracle and DBD::mysql from my perl scripts, and noticed an odd difference between how they operate. Consider this:<br />
<br />
    my $oracle = DBI-&gt;connect( @oracle_params ) or die $DBI::errstr;<br />
    my $mysql = DBI-&gt;connect( @mysql_params ) or die $DBI::errstr;<br />
<br />
    my $query = &quot;select * from table1&quot;;<br />
<br />
    my $sthO = $oracle-&gt;prepare( $query );<br />
    my $sthM = $mysql-&gt;prepare( $query );<br />
<br />
Everything is simple so far. But now we do &quot;$sthO-&gt;execute()&quot; and then &quot;$sthM-&gt;execute()&quot;. And this is where the weirdness begins: $sthO-&gt;execute returns immediately, while $sthM-&gt;execute takes a very long time and a lot of memory. It seems that with MySQL, the query is executed and its results are transferred from the mysql server to the script even before I start fetching the data, while with Oracle no data gets sent until I actually start fetching it with something like &quot;while( my $row = $sthO-&gt;fetchrow_arrayref() ) {}&quot;.<br />
<br />
Can anybody tell my _why_ MySQL sends the results in their entirety? Is there a way to prevent that from happening, and only return rows as I request them?<br />
<br />
Regards - D.]]></description>
            <dc:creator>Dmitry Nikiforov</dc:creator>
            <category>Perl</category>
            <pubDate>Fri, 02 Dec 2011 19:57:46 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?51,499307,499307#msg-499307</guid>
            <title>selectall_arrayref returns empty Array (1 reply)</title>
            <link>http://forums.mysql.com/read.php?51,499307,499307#msg-499307</link>
            <description><![CDATA[ PLEASE HELP: $dbh-&gt;selectall_arrayref is returning an empty array.<br />
<br />
But, when I run the same query in mysql it returns a lot of data.<br />
<br />
The exact same perl code is running and working on a freebsd server, so I know it is written correctly.<br />
<br />
I am just having a problem with $dbh-&gt;selectall_arrayref on my development machine.<br />
<br />
Other functions like $dbh-&gt;prepare work fine and return values.<br />
<br />
Is there a way to reset or update functions in mysql 5.5?<br />
<br />
I did have a hard time installing DBI &amp; DBD::mysql but I finally got them to install smoothly.<br />
<br />
My machine:  Mac OS X Snow Leopard, Mysql 5.5, Perl 5.10, DBI 1.616, DBD::mysql 4.020.<br />
<br />
Any help would be VERY appreciated.]]></description>
            <dc:creator>Dustin Macdonald</dc:creator>
            <category>Perl</category>
            <pubDate>Fri, 18 Nov 2011 05:20:27 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?51,498612,498612#msg-498612</guid>
            <title>Net::MySQL (1 reply)</title>
            <link>http://forums.mysql.com/read.php?51,498612,498612#msg-498612</link>
            <description><![CDATA[ Can someone help me with the example of how to use dynamic sql with Net::MySQL? The example in the perldoc for Net::MySQL only give you the example with hardcoded data which is not practice in real life case.<br />
<br />
thanks<br />
<br />
Lenny]]></description>
            <dc:creator>Lenny Cheng</dc:creator>
            <category>Perl</category>
            <pubDate>Thu, 17 Nov 2011 03:46:08 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?51,495582,495582#msg-495582</guid>
            <title>not able to install DBD::mysql on Windows (3 replies)</title>
            <link>http://forums.mysql.com/read.php?51,495582,495582#msg-495582</link>
            <description><![CDATA[ Hi,<br />
<br />
I have installed ActivePerl 5.12.4 on my windows machine which is missing DBD:mysql driver. I tried to install it through several ways but cudn't pass through.<br />
<br />
This is the error I'm receiving when I perform binary installation.<br />
<br />
C:\Perl\bin&gt;ppm install dbd-mysql<br />
Downloading DBD-mysql-4.020...redirect<br />
Downloading DBD-mysql-4.020...done<br />
Unpacking DBD-mysql-4.020...ppm install failed: Can't extract files from C:\User<br />
s\username\AppData\Local\Temp\ppm-x75dhB/DBD-mysql-4.020.tgz<br />
<br />
CPAN too doesn't work for me.<br />
<br />
I really have no idea of what could be the problem. Have spent real lot time to fix this but hard luck so far. Please help.<br />
<br />
Thanks,<br />
Preetha]]></description>
            <dc:creator>preetha m</dc:creator>
            <category>Perl</category>
            <pubDate>Fri, 06 Jan 2012 02:52:51 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?51,490773,490773#msg-490773</guid>
            <title>Help Me please (1 reply)</title>
            <link>http://forums.mysql.com/read.php?51,490773,490773#msg-490773</link>
            <description><![CDATA[ table1<br />
code	name	A	B	C	D<br />
1	matt	4	6	8	10<br />
2	sam	5	7	9	3<br />
3	jack	6	8	4	2<br />
<br />
table2<br />
code	name	A	B	C	D<br />
1	matt	3	4	5	6<br />
2	sam	2	5	3	4<br />
3	jack	3	7	5	3<br />
<br />
result<br />
<br />
code :	1<br />
name :	matt<br />
desc	table1	table2<br />
A	4	3<br />
B	6	4<br />
C	8	5<br />
D	10	6<br />
<br />
etc...<br />
<br />
how to select and result like above ? thanks for all]]></description>
            <dc:creator>Ahmad Fathoni</dc:creator>
            <category>Perl</category>
            <pubDate>Sun, 30 Oct 2011 17:33:43 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?51,487801,487801#msg-487801</guid>
            <title>What's wrong with my code?? (2 replies)</title>
            <link>http://forums.mysql.com/read.php?51,487801,487801#msg-487801</link>
            <description><![CDATA[ I'm a total noob to Perl. Why isn't this working?? I don't get an error message, it just returns '0' and nothing is added to the database:<br />
<br />
---------------------<br />
#!/usr/bin/perl<br />
<br />
use Mysql;<br />
use CGI;<br />
use DBI;<br />
<br />
print &quot;Content-type: text/html \n\n&quot;;<br />
<br />
# Read form data etc. dh<br />
my $cgi = new CGI;<br />
<br />
my $game = $cgi-&gt;param('game');#next 3 dh<br />
my $playerName = $cgi-&gt;param('player');<br />
my $score = $cgi-&gt;param('score');<br />
<br />
exit 0 unless $game; # dh<br />
<br />
# MYSQL CONFIG VARIABLES<br />
$host = &quot;xxxx&quot;;<br />
$database = &quot;xxxx&quot;;<br />
$tablename = &quot;xxxx&quot;;<br />
$user = &quot;xxxx&quot;;<br />
$pw = &quot;xxxx&quot;;<br />
<br />
# PERL MYSQL CONNECT()<br />
$connect = Mysql-&gt;connect($host, $database, $user, $pw);<br />
<br />
# SELECT DB<br />
$connect-&gt;selectdb($database);<br />
<br />
# DEFINE A MySQL QUERY<br />
$myquery = &quot;INSERT INTO $tablename (game, player, score) VALUES (?,?,?)&quot;;<br />
<br />
# PREPARE THE QUERY FUNCTION DH<br />
$execute = $connect-&gt;prepare($myquery);<br />
<br />
# EXECUTE THE QUERY FUNCTION DH<br />
$execute-&gt;execute($games, $player, $score);<br />
<br />
# AFFECTED ROWS<br />
$affectedrows = $execute-&gt;affectedrows($myquery);<br />
<br />
# ID OF LAST INSERT<br />
$lastid = $execute-&gt;insertid($myquery);<br />
<br />
print $affectedrows.&quot;&lt;br /&gt;&quot;;<br />
print $lastid.&quot;&lt;br /&gt;&quot;;<br />
<br />
-------------------------------<br />
<br />
If I replace the lines:<br />
<br />
# PREPARE THE QUERY FUNCTION DH<br />
$execute = $connect-&gt;prepare($myquery);<br />
<br />
# EXECUTE THE QUERY FUNCTION DH<br />
$execute-&gt;execute($games, $player, $score);<br />
<br />
With:<br />
<br />
# EXECUTE THE QUERY FUNCTION<br />
$execute = $connect-&gt;query($myquery);<br />
<br />
And I put explicit VALUES in the definition of $myquery preceding this line the values are inserted with no issues...<br />
<br />
If it helps at all the HTML form code I'm using is:<br />
<br />
&lt;form action=&quot;xxx&quot; method=&quot;POST&quot;&gt;<br />
&lt;p&gt; Game Name: &lt;input type=&quot;text&quot; name=&quot;game&quot;/&gt; &lt;/p&gt;<br />
&lt;p&gt; Player Name: &lt;input type=&quot;text&quot; name=&quot;player&quot;/&gt; &lt;/p&gt;<br />
&lt;p&gt; Score: &lt;input type=&quot;text&quot; name=&quot;score&quot;/&gt; &lt;/p&gt;<br />
      &lt;input type=&quot;submit&quot; value=&quot;Submit&quot;/&gt;<br />
&lt;/form&gt;<br />
<br />
<br />
What's goin on here? I feel like my code matches every example I can find to a tee...]]></description>
            <dc:creator>Dain Hedgpeth</dc:creator>
            <category>Perl</category>
            <pubDate>Mon, 24 Oct 2011 17:13:32 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?51,444292,444292#msg-444292</guid>
            <title>Importing a .tsv file into a mysql table (1 reply)</title>
            <link>http://forums.mysql.com/read.php?51,444292,444292#msg-444292</link>
            <description><![CDATA[ Hi All,<br />
<br />
I have a tab separated file (.tsv) which I would like to import into a table. The file is large (around 11GB) in size with 256 columns. <br />
<br />
I tried running the following command from the mysql prompt<br />
<br />
LOAD DATA LOCAL INFILE 'importfile.tsv' <br />
INTO TABLE test.destination_table<br />
LINES TERMINATED BY '\n';<br />
<br />
and it would only copy the first row of the file. <br />
<br />
How do I get the entire data set in ? Alternately, if there is another way to do it thru the Workbench interface - that would be even better. Any suggestions, let me know. <br />
<br />
Thanks for your help in advance<br />
hector]]></description>
            <dc:creator>Hector Mehta</dc:creator>
            <category>Perl</category>
            <pubDate>Fri, 07 Oct 2011 15:41:32 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?51,436698,436698#msg-436698</guid>
            <title>using Signed Int in table (2 replies)</title>
            <link>http://forums.mysql.com/read.php?51,436698,436698#msg-436698</link>
            <description><![CDATA[ hi,<br />
I am trying to insert negative integers into one of the columns of my table so I tried to specify the variable as<br />
col1 SIGNED INT NOT NULL,<br />
<br />
however, that gives an error. how do I fix this, so my col1 can accept negative integers. thx!]]></description>
            <dc:creator>B A</dc:creator>
            <category>Perl</category>
            <pubDate>Wed, 28 Sep 2011 12:07:11 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?51,434463,434463#msg-434463</guid>
            <title>Load data is slow (no replies)</title>
            <link>http://forums.mysql.com/read.php?51,434463,434463#msg-434463</link>
            <description><![CDATA[ Greetings! I am loading data from a file to a table using &quot;load data local infile&quot; and have found that loading on the same server is quite a bit faster than if I load to a database that is across the network. The file is between 50 and 60 million records, almost 4 GB in size, pipe (|) delimited, database is 5.0.51a. I am using a Perl script (DBI module) to connect to the database and run the load statement. <br />
<br />
I understand that loading over the network will always be a little slower, but this is slow by a factor of 2 to 3. Is this normal? <br />
<br />
I have found the folloiwng (times are approximate and vary quite a bit): <br />
Loading from server A to a database on server A: 12 to 15 minutes <br />
Loading from server A to server B over Gigabit ethernet: 45 to 90 min. (the preferred production configuration) <br />
Transferring the file from A to B using sftp: 2 min. <br />
Loading server B to database on server B 12 to 15 min. (using MySQL command prompt). <br />
<br />
There are no indexes on the table but there is a primary key. There are no rows in the table when the load starts. <br />
<br />
Things I've tried so far:<br />
Using the mysql command prompt. Over the network is still slow but is a little faster than the Perl DBI connection. I tried this in the Perl script using a qx() to run the command.  Again, it is a little faster, but not significant.<br />
<br />
Increasing BULK_INSERT_BUFFER_SIZE=256217728. No change.<br />
<br />
Increasing MYISAM_SORT_BUFFER_SIZE=256217728. No change.<br />
<br />
Using Disable Keys. No change.<br />
<br />
<br />
<br />
Given the data above it seems this has to be the MySQL protocol, not the network and not either server. <br />
<br />
Any suggestions what to look at in terms of variables to change, network monitoring, and troubleshooting would be appreciated.<br />
<br />
<br />
Thanks!<br />
<br />
John]]></description>
            <dc:creator>John Stricklen</dc:creator>
            <category>Perl</category>
            <pubDate>Fri, 16 Sep 2011 18:20:35 +0000</pubDate>
        </item>
    </channel>
</rss>
