30 PM
To: Gavin Towey
Cc: mysql@lists.mysql.com
Subject: Re: Mysql Perl DBI DBD Version Compatability for MAC OS 10.6
Here is the error I am receiving ( I posted this issue in the recent past):
dyld: lazy symbol binding failed: Symbol not found: _mysql_init
Referenced from:
/Library/Perl/5.10.0/darwi
anymore.
>
> Currently, I am running:
>
> 1. mysql Server Version 5.4.1-beta MySQL Community Server
>
> 2. perl version 5.8.9 built for Darwin 2level
>
> 3. perl DBI version 1.609
>
> 4. perl DBD:mysql 4.012
>
> I am not positive which
Server
2. perl version 5.8.9 built for Darwin 2level
3. perl DBI version 1.609
4. perl DBD:mysql 4.012
I am not positive which of the above are 32 or 64 bit but help discerning which
32/64 versions are required would also be appreciated. I am happy ;-( to
uninstall and reinstall a
it options I have to confess there
are too many choices and not enough information on how to choose for me to
trust my own judgment anymore.
Currently, I am running:
1. mysql Server Version 5.4.1-beta MySQL Community Server
2. perl version 5.8.9 built for Darwin 2level
3. perl D
Baron Schwartz wrote:
Kemin Zhou wrote:
Hi All,
I have one of the toughest problem to solve now. I have not been
able to sleep well in the last three days.
There is a simple query
insert into table foo (column1, column2, column5)
select $col
from bar
If I run this query by hand whatever th
Kemin Zhou wrote:
Hi All,
I have one of the toughest problem to solve now. I have not been able
to sleep well in the last three days.
There is a simple query
insert into table foo (column1, column2, column5)
select $col
from bar
If I run this query by hand whatever the value of $col, it wor
At 6:54 PM -0700 6/9/07, Kemin Zhou wrote:
Hi All,
I have one of the toughest problem to solve now. I have not been
able to sleep well in the last three days.
There is a simple query
insert into table foo (column1, column2, column5)
select $col
from bar
If I run this query by hand whatever
Hi All,
I have one of the toughest problem to solve now. I have not been able
to sleep well in the last three days.
There is a simple query
insert into table foo (column1, column2, column5)
select $col
from bar
If I run this query by hand whatever the value of $col, it works fine.
The ins
| Hi All,
|
| I have 2 separate mysql servers and need to import data from a table on
| sever1 to
| a table on server2. This would need to be done in Perl.
|
| The script in question already has open handles to both servers, so I
| know I can
| select all the rows from server1 and process them on
George, that's probably about the easiest way you could do it in perl.
If you want every column transferred you could do a "SELECT *" instead
of enumerating columns I think.
Dan
On 9/29/06, George Law <[EMAIL PROTECTED]> wrote:
Hi All,
I have 2 separate mysql servers and need to import data f
Hi All,
I have 2 separate mysql servers and need to import data from a table on
sever1 to
a table on server2. This would need to be done in Perl.
The script in question already has open handles to both servers, so I
know I can
select all the rows from server1 and process them one by one and in
perl(DBI) is needed by MySQL-server-5.0.18-0.glibc23
perl(DBI) is needed by MySQL-client-5.0.18-0.glibc23
I have downloaded coreutils-5.92.tar, but its contents sould be in
/bin already
and I tried to verify DBI:
[prompt] perl -M'DBI 999' -e1
DBI version 999 requ
I am attempting to install MySQL-server-5.0.18-0.glibc23 via rpm.
I am getting this message:
warning: MySQL-server-5.0.18-0.glibc23.i386.rpm: V3 DSA signature:
NOKEY, key ID 5072e1f5
error: Failed dependencies:
coreutils is needed by MySQL-server-5.0.18-0.glibc23
perl(DBI) is
For the t/40 error, you can install the missing module which appears to
be missing.
There is also a Bundle::DBI module from CPAN which will install the DBI
and dependent modules.
Alfred
Lewis Ashley Foster wrote:
Ok, i had a look at the perl DBI installations and tried "make
test&
cpan shell. This should
continue the install even if few tests failed.
Lewis Ashley Foster wrote:
>
> Ok, i had a look at the perl DBI installations and tried "make
> test"i think this explains a thing or two!
>
> Both 1.32 and 1.49 fail massively it seems. I
Ok, i had a look at the perl DBI installations and tried "make test"i
think this explains a thing or two!
Both 1.32 and 1.49 fail massively it seems. I'll go for version 1.32 so the
output for the make test on 1.32 is below.
I seriously have no idea where to start with
Lewis,
As you already have perl installed, an easier way of getting modules
is by way of CPAN (www.cpan.org). Give this a try, as superuser:
cpan install DBI
Regards,
Imran
--
http://www.EjectDisc.com
Get your Digital Identity - Domain Names, Web Space, E-mail & More!
--
MySQL General Mailing L
Hello.
Follow instructions from:
http://dev.mysql.com/doc/refman/5.0/en/perl-support.html
Logg, Connie A. wrote:
> I have done various searches, and cannot locate the perl dbi for mysql =
> 5.0.16.
>
> I assume that the old one for mysql 4 will not work.
>
>
I have done various searches, and cannot locate the perl dbi for mysql 5.0.16.
I assume that the old one for mysql 4 will not work.
Can someone please provide me the url for mysql 5's perl dbd/dbi bundle?
Thanks, Connie
Connie Logg, Network Analyst
Stanford Linear Accelerator Center
ph: 65
Hello.
> rpm -ivh perl-DBI-1.40-5.src.rpm
This rpm installs only the source of perl-DBI, install a binary rpm for
your architecture. You might need to use --force option for rpm command
in case you have a fresher working version of perl-DBI.
Lewis Ashley Foster wrote:
>
On Mon, 2005-12-12 at 15:20 +, Lewis Ashley Foster wrote:
>
> warning: MySQL-server-standard-5.0.16-0.rhel3.i386.rpm: V3 DSA signature:
> NOKEY, key ID 5072e1f5
> error: Failed dependencies:
> perl(DBI) is needed by MySQL-server-standard-5.0.16-0.rhel3
> Sug
>
> I get this result:
>
> warning: MySQL-server-standard-5.0.16-0.rhel3.i386.rpm: V3 DSA signature:
> NOKEY, key ID 5072e1f5
> error: Failed dependencies:
> perl(DBI) is needed by MySQL-server-standard-5.0.16-0.rhel3
> Suggested resolutions:
> pe
ature:
NOKEY, key ID 5072e1f5
error: Failed dependencies:
perl(DBI) is needed by MySQL-server-standard-5.0.16-0.rhel3
Suggested resolutions:
perl-DBI-1.32-5.i386.rpm
But I have already installed perl dbi 1.40 like this with no errors:
rpm -ivh perl-DBI-1.40-5.src.rpm
I really
ewsgroup comp.lang.perl.misc, or on the Perl Monks site
www.perlmonks.org.
> -Original Message-
> From: sam [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 10, 2005 7:56 AM
> To: Mysql
> Subject: Perl DBI does not print error.
>
> Hi,
>
> The perl DBI does n
Hi!
Am Do, den 10.03.2005 schrieb sam um 14:55:
> Hi,
>
> The perl DBI does not prints error message:
> $sth = $dbh->prepare($insert_sql)
>|| print ERRFILE_OUT "prepare: $insert_sql: $DBI::errstr";
>
> The out of this error only does not prin
Hi,
The perl DBI does not prints error message:
$sth = $dbh->prepare($insert_sql)
|| print ERRFILE_OUT "prepare: $insert_sql: $DBI::errstr";
The out of this error only does not print why the error was occurred.
eg.
Unable to execute query: DBI::db=HASH(0x8647df0)->er
Good morning!
Important: SQL Server used: MySQL (version 4.0.17) on UNIX FreeBSD.
Answer this question please:
Can I make a request, consisting of several SQL commands at one step, like this:
use DBI;
my $db = DBI->new();
$db = DBI->connect(...) or die "Can't connect to DataBase:", "error code",
Hi all, i have a MySQL driven web system that searches a pretty big DB of
property info. (10 data tables, about 50,000,000 total rows, average 300
concurrent users)
There are actually 2 databases that feed this site, one is meta info, and isnt
hit that heavily. Lets call those DB's 'data' and '
004 10:01 PM
Subject: table locking using perl DBI
> I have a perl cgi script that needs to lock the tables.
Unfortunately,
> as HTTP is a one shot protocol, once the cgi script completes
execution,
> the tables are unlocked.
>
> I need it to stay locked until another cgi script u
Andy Ford wrote:
I have a perl cgi script that needs to lock the tables. Unfortunately,
as HTTP is a one shot protocol, once the cgi script completes execution,
the tables are unlocked.
I need it to stay locked until another cgi script unlocks them!
Is there any other way of achieving this!?
You c
I have a perl cgi script that needs to lock the tables. Unfortunately,
as HTTP is a one shot protocol, once the cgi script completes execution,
the tables are unlocked.
I need it to stay locked until another cgi script unlocks them!
Is there any other way of achieving this!?
Thanks
Andy
--
Daniel J. Conlon wrote:
Hi,
When executing this query through the 'mysql' command line utility, the
result is returned from the database server immediately and the database
server does not create a temporary file.
(SELECT
domains.domain,accounts.owner,accounts.type,accounts.server,accounts.win
Hi,
When executing this query through the 'mysql' command line utility, the
result is returned from the database server immediately and the database
server does not create a temporary file.
(SELECT
domains.domain,accounts.owner,accounts.type,accounts.server,accounts.win
server,zone_records.record
On Fri, 16 Jan 2004 17:54:06 -0500
"Syed Ali" <[EMAIL PROTECTED]> wrote:
> I have a Perl CGI script which uses DBI to access MySQL.
> I noticed that each query through the Perl CGI script using DBI has a
> connect, query and then quit.
> I was wondering if there is a way of keeping the connection
Hello,
I have a Perl CGI script which uses DBI to access MySQL.
I noticed that each query through the Perl CGI script using DBI has a
connect, query and then quit.
I was wondering if there is a way of keeping the connection persistent
to Mysql through the Perl CGI script.
In my Apache httpd.conf
On 12/6/03 8:52 AM Dan Anderson wrote:
I am using the Perl DBI to connect to a mySQL database. I am
using prepare and execute statements to send the query to the database
and then execute it. Is there any benefit to doing this versus using
do?
The O'Reilly book "Programming th
I am using the Perl DBI to connect to a mySQL database. I am
using prepare and execute statements to send the query to the database
and then execute it. Is there any benefit to doing this versus using
do?
Thanks,
Dan
--
MySQL General Mailing List
For list archives: http
"nm" <[EMAIL PROTECTED]> wrote:
>
> I can login on console. I can telnet 192.168.1.20 3306 from a remote host
> but when I try to connect using perl DBI i get this error:
>
> DBI connect('database=test;hostname=192.168.1.20','root',...)
> I added Host 192.168.1.10 user root with passowrd in mysql user table.
Did you flush privileges?
did you hash the password using the 'password' function?
did you type the password correctly ?
>
> Ideas? What else?
>
> Thanks.
--
I can login on console. I can telnet 192.168.1.20 3306 from a remote host
but when I try to connect using perl DBI i get this error:
DBI connect('database=test;hostname=192.168.1.20','root',...) failed: Access
denied for user: '[EMAIL PROTECTED]' (Using password: Y
ExpiryDate
On 28-Feb-2003 Jeff Snoxell wrote:
> Hi,
>
> If I run a mysql query then work through the results of that query one at a
> time, deleting the record sometimes eg:
>
> while (my $href = $sth->fetchrow_hashref())
> {
>if ($href->{'ExpiryDate'} eq '2003-02-22 00:00:00') {
> # Do
Hi,
If I run a mysql query then work through the results of that query one at a
time, deleting the record sometimes eg:
while (my $href = $sth->fetchrow_hashref())
{
if ($href->{'ExpiryDate'} eq '2003-02-22 00:00:00') {
# Do something
# then...
$db->do("DELETE FROM MyTable WHERE ID
hi
pls
look into "man DBI" and find there this command.
kr
mr
>>> Jeff Snoxell <[EMAIL PROTECTED]> 01/18/03 10:45 AM >>>
Hi,
just stumbled across the following piece of code:
my $rowcount = $sth->rows();
And I checked it out compared to a count of the fetched rows from an SQL
QUERY. AND It
At 9:39 + 1/18/03, Jeff Snoxell wrote:
Hi,
just stumbled across the following piece of code:
my $rowcount = $sth->rows();
And I checked it out compared to a count of the fetched rows from an
SQL QUERY. AND It matched exactly!
BUT, I can't find the command "rows()" in the DBI documentation
No conspiracy, read it again ! ;)
http://www.perldoc.com/cpan/DBI.html#rows
Joseph Bueno
Jeff Snoxell wrote:
> Hi,
>
> just stumbled across the following piece of code:
>
> my $rowcount = $sth->rows();
>
> And I checked it out compared to a count of the fetched rows from an SQL
> QUERY. AND It
Hi,
just stumbled across the following piece of code:
my $rowcount = $sth->rows();
And I checked it out compared to a count of the fetched rows from an SQL
QUERY. AND It matched exactly!
BUT, I can't find the command "rows()" in the DBI documentation.
What's the story? Have I unearthed a cons
15, 2003 6:22 AM
To: [EMAIL PROTECTED]
Subject: Perl DBI $sth->fetchrow_hashref() persistence?
Hi,
if I call:
my $record = $sth->fetchrow_hashref();
then:
$sth->finish();
How valid is it for me to keep referring to my $record hash pointer?
Thanks,
Jeff Snoxell
Aetherweb Ltd
http:/
Hi,
if I call:
my $record = $sth->fetchrow_hashref();
then:
$sth->finish();
How valid is it for me to keep referring to my $record hash pointer?
Thanks,
Jeff Snoxell
Aetherweb Ltd
http://www.aetherweb.co.uk
[SPAM FILTER FODDER: MySQL, QUERY]
---
DBI::errstr\n";
$dbh->do("create database dbname");
$dbh->disconnect or warn "Disconnection failed: $DBI::errstr\n";
On Wednesday, January 8, 2003, at 12:04 PM, Ken Hilliard wrote:
I'd like to be able to create a new database using Perl/DBI instead of
using
the MyS
I'd like to be able to create a new database using Perl/DBI instead of using
the MySQL command line (and other) utilities. It looks like you can create a
new database with the driver handle but I can't seem to ma
Hi Jeff,
Try the magic undef as it is with no '' or ""
$dbh->do('insert into yourtab values (' .
join (',', map($dbh->quote($_), $your_stuff, undef, $more_stuff)) .
')') ;
Regards
Salam
Jeff Snoxell wrote:
Hello,
I've got a mysql table with a lot of fields and I'm using a map
From: Jeff Snoxell <[EMAIL PROTECTED]>
> ...I'm using a map statement...
> ...through the quote system...
Short answer: Don't do that.
The longer answer:
# Prepare the SQL using 'bind' operators.
$sth = $MyDatabase->prepare(qq{
INSERT INTO MyTable
(col1, col2, col3)
VALUES
Date: Wed, 8 Jan 2003 01:56:39 +0100
From: [EMAIL PROTECTED]
To: Paul DuBois <[EMAIL PROTECTED]>
Subject: Re: Re: Using Perl DBI quote() method with NULL values?
At 17:16 -0500 1/7/03, walt wrote:
Jeff,
I'm not sure if this will help or not, but we ended up adding our
own version
On 7 Jan 2003, at 18:32, Jeff Snoxell wrote:
> Which works fine except the "\N" isn't entered into my database as a null
> value. I've also tried '\N' and '' and "".
Null values are represented as undef in DBI.
[Filter fodder: SQL]
--
Keith C. Ivey <[EMAIL PROTECTED]>
Tobacco Documents Online
Jeff Snoxell wrote:
> Hello,
>
> I've got a mysql table with a lot of fields and I'm using a map statement
> to pass each of my values for a new record through the quote system so-as
> to have everything nicely wrapped up. Problem is that I can't find any way
> of writing a null value to my DB whe
At 18:32 + 1/7/03, Jeff Snoxell wrote:
Hello,
I've got a mysql table with a lot of fields and I'm using a map
statement to pass each of my values for a new record through the
quote system so-as to have everything nicely wrapped up. Problem is
that I can't find any way of writing a null val
Hello,
I've got a mysql table with a lot of fields and I'm using a map statement
to pass each of my values for a new record through the quote system so-as
to have everything nicely wrapped up. Problem is that I can't find any way
of writing a null value to my DB when the value has first passed
== 0 or die "could not do system - $!";
open I, "<$file" or die "could not open $file - $!";
while (){
print "$_";
}
close I;
-Original Message-
From: Bernd Prager [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 03, 2002 2:33
Sarah Killcoyne wrote:
I need to be able to connect to mysql through a perl or C++ script without
knowing the name of the database to connect to. I can't seem to find a way
to do this. Is it possible to either: look up database names so I can pick
one before connecting or connect without a data
- Original Message -
From: "Sarah Killcoyne" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, December 03, 2002 11:14 AM
> I need to be able to connect to mysql through a perl or C++ script without
> knowing the name of the database to connect to.
,,,
I'm not an expert om the
---
Duncan Salada
Titan Systems Corporation
301-925-3222 x375
-Original Message-
From: Sarah Killcoyne [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 03, 2002 11:14 AM
To: [EMAIL PROTECTED]
Subject: Perl DBI or C++ API Help!
I need to be able to connect
I need to be able to connect to mysql through a perl or C++ script without
knowing the name of the database to connect to. I can't seem to find a way
to do this. Is it possible to either: look up database names so I can pick
one before connecting or connect without a database name so I can "show
yeah, but i was looking for a function. mostly just to see if a matching
function to dbh->tables() existed.
-Original Message-
From: Grigor, Peter [mailto:pgrigor@;aseedge.com]
Sent: Friday, November 08, 2002 10:07 AM
To: 'Shon Stephens'; '[EMAIL PROTECTED]'
Su
Of course, you could have also used:
$stmt = $db->prepare("show databases");
Peter
<^_^>
-Original Message-
From: Shon Stephens [mailto:sstephens@;corp.goamerica.net]
Sent: Friday, November 08, 2002 9:50 AM
To: Shon Stephens; '[EMAIL PROTECTED]'
Subject: RE
No clue of dbi/dbd but the query SHOW DATABASES does what it tells.
STIBS
- Original Message -
From: "Shon Stephens" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, November 08, 2002 3:44 PM
Subject: perl dbi and mysql question
> i am using perl db
eureka! i found it!
@dbs = $dbh->func('_ListDBs');
-Original Message-
From: Shon Stephens [mailto:sstephens@;corp.goamerica.net]
Sent: Friday, November 08, 2002 9:45 AM
To: '[EMAIL PROTECTED]'
Subject: perl dbi and mysql question
i am using perl dbi with dbd::m
i am using perl dbi with dbd::mysql. i know that using the dbi function,
$dbh->tables (), will list all the tables in a database. is there a function
that will show all the databases on a server?
thanks,
shon
-
Before post
On Sat, Sep 21, 2002 at 02:06:01AM -0500, Kevin wrote:
> Hello, I was wondering if anyone knows PERL & DBI, if so please respond to
>[EMAIL PROTECTED] personally, or to the list
>
>
> My question is, I'm trying to build a 'custom' querier for a survey pro
Hello, I was wondering if anyone knows PERL & DBI, if so please respond to
[EMAIL PROTECTED] personally, or to the list
My question is, I'm trying to build a 'custom' querier for a survey program... based
on the information submitted, the program will generate an SQL Q
Hello, I need some advice regarding a scrolling list that I've built
from a query. I can generated the scrolling list just fine, but when I
try to put the subroutine within a table (cell), all I get is a hash
reference:
-+-+
Date
At 10:23 -0800 6/21/02, nellA hciR wrote:
>iH
>
>running mySQL 3.23.51, i have a my.cnf file with local-infile=1 and
>am able to use the "load data local file" command when running run
>the interactive mysql app (command line).
>
>my problem is that i can not use the "load data local" command fr
iH
running mySQL 3.23.51, i have a my.cnf file with local-infile=1 and am
able to use the "load data local file" command when running run the
interactive mysql app (command line).
my problem is that i can not use the "load data local" command from a
Perl script. i am connecting as the same us
Yes.
Denny said:
> Hi,
>
> How can i use Perl DBI to create tables in mysql?
>
> Denny
>
> __
> Do You Yahoo!?
> Everything you'll ever need on one web page
> from News and Sport to Email and Mu
Hi Denny,
>How can i use Perl DBI to create tables in mysql?
I am not an expert in CPAN modules for Perl but I am using the DBD module
that needs DBI module for access the MySQL. Please see the man pages for DBI
module.
I am using the:
DBI-1.22
DBD-mysql-2.1017
You can installing
Hi,
How can i use Perl DBI to create tables in mysql?
Denny
__
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yaho
On Sun, Mar 10, 2002 at 09:59:09AM +0200, Toomas Vendelin wrote:
> It doesn't look "same way" :(. Normally I've read data from a file
> on a client's machine using Perl's read function like this
>
> while(read($file, $data, 1024))
> {
> print TO $data;
> }
>
> to write it from $file on cli
o open a filehandle to a database field and then
"print" to it? :).
Regards,
Tom
Saturday, March 09, 2002, 9:00:08 PM, you wrote:
PD> At 16:39 +0200 3/9/02, [EMAIL PROTECTED] wrote:
>>Hello.
>>
>>How to load binary data into a table using
>>Perl DBI module (t
At 16:39 +0200 3/9/02, [EMAIL PROTECTED] wrote:
>Hello.
>
>How to load binary data into a table using
>Perl DBI module (the data is uploaded from a HTML
>form)?
Same way you load any other kind of data. Use placeholders or the quote()
function.
>
>I failed to find any
Hello.
How to load binary data into a table using
Perl DBI module (the data is uploaded from a HTML
form)?
I failed to find any information on MySQL site.
Thanks in advance.
-
Before posting, please check:
http
Hello all,
I am new to linux. I was told that I need DBI::DBD to connect to Mysql
using perl. So I go to http://www.mysql.com/downloads/api-dbi.html and
downloaded DBI-1.18.tar.gz, Msql-Mysql-modules-1.2216.tar.gz. Using gunzip,
I unziped the two files. Now I have DBI-1.18.tar and
Msql-Mysq
At 15:51 -0800 2/14/02, Brian Warn wrote:
>When I run the code below, information about the first column in each
>table in my list is excluded. Any ideas why?
Why are you reading a row into @row_ary?
I bet you're thinking that row will correspond to the row of column
headers that you'd see wer
On 14 Feb 2002, at 15:51, Brian Warn wrote:
> When I run the code below, information about the first column in each
> table in my list is excluded. Any ideas why?
[snip]
> @row_ary = $sth->fetchrow_array;
You've read that information into @row_ary, but then you never do
anything with it
When I run the code below, information about the first column in each
table in my list is excluded. Any ideas why?
@table_listing=`cat /usr/local/file.txt`; # contains table list used
below
$dbh =
DBI->connect("dbi:mysql:database=dbname;host=hostIP;port=port_number",
"user", "password") or di
ct: Error with code utilizing perl DBI & mysql ??
This is a bit strange, but I was writing code
and adding some select statements that seemed to be
working fine until about the 5 th one, ...
then i get errors :
I am a bit of a newbie at mysql & dbi.
any help much appreciated
Error:
Can
This is a bit strange, but I was writing code
and adding some select statements that seemed to be
working fine until about the 5 th one, ...
then i get errors :
I am a bit of a newbie at mysql & dbi.
any help much appreciated
Error:
Cant set DBI::db-HASH(0x1b73b70->{Printerror}:
unrecong
Bob,
As soon as you compiled and installed perl itself, the Config
module of perl will tell any Makefile.PL driven package where to
install itself: under the directory structure of perl.
I don't know for sure, but I suppose DBI DBD installs via
Makefile.pl script... If not, do a perl -V to see w
Now that I have the correct Install procedure for the Perl DBI and MySQL
DBD,
Where is the most common and preferred Location for the Install??
I was considering the following.
/usr/local/
/usr/local/share/
/usr/share/mysql
/usr/share/perl5/
Sometimes a script or program
--
From: "Jeremy Zawodny" <[EMAIL PROTECTED]>
To: "Philip Mak" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, September 07, 2001 10:48 PM
Subject: Re: Perl DBI: Same column name in different tables problem
> On Fri, Sep 07, 2001 at 10:03:03PM -0700, Phil
On Fri, Sep 07, 2001 at 10:03:03PM -0700, Philip Mak wrote:
> Let's say I performed the following query using Perl DBI:
>
> $row = $dbh->selectrow_hashref(<<"~");
> SELECT fanfics.handle, authors.handle
> FROM fanfics, authors
> WHERE fanfics.aid = auth
Let's say I performed the following query using Perl DBI:
$row = $dbh->selectrow_hashref(<<"~");
SELECT fanfics.handle, authors.handle
FROM fanfics, authors
WHERE fanfics.aid = authors.aid
~
I won't be able to access both fanfics.handle and authors.handle thi
DBI 1.20 onwards you can now say
$dbh->selectcol_arrayref("select f1, f2 from ...", { Columns=>[1,2] });
and have all the fields flattened into a list. Very handy when building a hash.
But then for building a hash DBI 1.20 also has selectall_hashref() :-)
"The Perl DB
On Fri, Aug 24, 2001 at 10:07:59AM -0700, Katherine Porter wrote:
> For single values I usually use this DBI function and query:
>
> my $val =3D $dbh->selectrow_array("SELECT value FROM tab1 WHERE test=3D=
> 2");
>
> However, what if I want to store a bunch of values into an array?
>
> my @
At 10:07 AM -0700 8/24/01, Katherine Porter wrote:
>For single values I usually use this DBI function and query:
>
> my $val =3D $dbh->selectrow_array("SELECT value FROM tab1 WHERE test=3D=
>2");
>
>However, what if I want to store a bunch of values into an array?
>
> my @vals =3D $dbh->?(
For single values I usually use this DBI function and query:
my $val =3D $dbh->selectrow_array("SELECT value FROM tab1 WHERE test=3D=
2");
However, what if I want to store a bunch of values into an array?
my @vals =3D $dbh->?("SELECT value FROM tab1 WHERE test > 10");
What's the syntax
I just installed DBI module and try to run a cgi script from browser to
access
Mysql Database. The browser responsed with "Internal Error"
>From the /var/httpd/error_log it says
Caught SIGTERM, shutting down
Warning: user directive in requires SUEXEC wrapper.
What is that means??
Can anyone
You are correct, of course, Werner. I was thinking along the wrong
path - of trying to write AS I looped (as I was doing with the text
file), rather than using the loop to build the INSERT statement and
THEN writing to the database.
Christopher Jones also provided me with a sample of very bas
t;;
}
$q = substr($q, 0, -2);
//take off the last ', '
$q .= ')';
//you are done, hoopefully, with something like
//INSERT INTO table (..., ...) VALUES ('...', ...)
Nelson Goforth schrieb am Dienstag, 31. Juli 2001, 20:47:31:
> In my application I'm wr
On Tue, 31 Jul 2001, Nelson Goforth wrote:
>
> And this works fine for the text file - but from what I've seen I
> probably can't carry over the iteration through the (up to) 100
> actual survey questions. I named the MySQL fields 'q1', 'q2',
> anticipating some way to do a loop, but I can't
In my application I'm writing up to 120 fields of data in one swoop
(the results of a sort of survey). I'm using Perl DBI with MySQL.
Each survey has several fields of data like 'name' (stored as
parameters in the CGI object $asmt) and then up to 100 actual survey
qu
r> I was not aware of placeholders, and the benifits of using them instead of
r> using $dbh->quote(). It doesnt make sence that the DBI version of quote isnt
r> as thorough as having the code behind placeholding do it.
I'm not DBI guru but I've seen that quote() doesn't quote some data
correctly
1 - 100 of 140 matches
Mail list logo