Re: Perl with MySQL

2004-09-13 Thread Egor Egorov

Just go to http://dbi.perl.org/

You will need to download DBI and DBD::Mysql. Then you could install it manually, 
even no need to run the CPAN shell. 





-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   <___/   www.mysql.com




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Perl with MySQL

2004-09-10 Thread gerald_clark
This is the 3rd time you have asked this.
Perhaps you should take it to a perl list where it belongs.
Kirti S. Bajwa wrote:
Hello:
I am trying to install Perl support with MySQL. After installing MySQL
(v4.0.20)I run the following commands:
% echo $PATH
% perl -MCPAN -e shell
Note: Answer “no” to auto-configure perl.
cpan> install Data::Dumper
(Upto this point. Following commands are not run yet.)  
cpan> install Bundle::DBI
cpan> install Bundle::DBD::mysql
cpan> quit
Today, when I tried to install Perl using the above sequence of commands.
However, after I entered the third command "cpan> install Data::Dumper";, a
message was displayed indicating that there is a new version of perl & it
canbe installed by using the command "cpan> install Bundle::CPAN". Well, I
changed the commands to as follows:
% echo $PATH
% perl -MCPAN -e shell
Note: Answer “no” to auto-configure perl.
cpan> install Data::Dumper
cpan> install Bundle::CPAN   
cpan> install Bundle::DBI
cpan> install Bundle::DBD::mysql
cpan> quit
I am not sure if the above command sequence is correct or not? I know about
Perl as much as I know about brain surgery. However, I am willing to read if
I know where. 

Thanks in advance.
Kirti
PS: I have no idea id I posted this or not. So if it is duplicate, please
ignore.
 


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


RE: Perl with MySQL

2004-09-09 Thread Kirti S. Bajwa
Hello:

I am trying to install Perl support with MySQL. After installing MySQL
(v4.0.20)I run the following commands:


% echo $PATH
% perl -MCPAN -e shell
Note: Answer “no” to auto-configure perl.
cpan> install Data::Dumper
(Upto this point. Following commands are not run yet.)  
cpan> install Bundle::DBI
cpan> install Bundle::DBD::mysql
cpan> quit

Today, when I tried to install Perl using the above sequence of commands.
However, after I entered the third command "cpan> install Data::Dumper";, a
message was displayed indicating that there is a new version of perl & it
canbe installed by using the command "cpan> install Bundle::CPAN". Well, I
changed the commands to as follows:

% echo $PATH
% perl -MCPAN -e shell
Note: Answer “no” to auto-configure perl.
cpan> install Data::Dumper
cpan> install Bundle::CPAN  
cpan> install Bundle::DBI
cpan> install Bundle::DBD::mysql
cpan> quit

I am not sure if the above command sequence is correct or not? I know about
Perl as much as I know about brain surgery. However, I am willing to read if
I know where. 

Thanks in advance.

Kirti

PS: I have no idea id I posted this or not. So if it is duplicate, please
ignore.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Perl with MySQL

2004-09-08 Thread Kirti S. Bajwa
Hello:

I am trying to install Perl support with MySQL. After installing MySQL
(v4.0.20)I run the following commands:


% echo $PATH
% perl -MCPAN -e shell
Note: Answer “no” to auto-configure perl.
cpan> install Data::Dumper
(Upto this point. Following commands are not run yet.)  
cpan> install Bundle::DBI
cpan> install Bundle::DBD::mysql
cpan> quit

Today, when I tried to install Perl using the above sequence of commands.
However, after I entered the third command "cpan> install Data::Dumper";, a
message was displayed indicating that there is a new version of perl & it
canbe installed by using the command "cpan> install Bundle::CPAN". Well, I
changed the commands to as follows:

% echo $PATH
% perl -MCPAN -e shell
Note: Answer “no” to auto-configure perl.
cpan> install Data::Dumper
cpan> install Bundle::CPAN  
cpan> install Bundle::DBI
cpan> install Bundle::DBD::mysql
cpan> quit

I am not sure if the above command sequence is correct or not? I know about
Perl as much as I know about brain surgery. However, I am willing to read if
I know where. 

Thanks in advance.

Kirti

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Perl with Mysql

2002-10-03 Thread Amer Neely

> HI all
> I'm trying to do the following
> 
>---
> # want to select (just preparing) every thing from the table PERSON 
> where i don't know the deptID yet.
> $per = $dbh->prepare("SELECT * FROM person WHERE deptID = ?");
>  
> # selecting deptID from the table ACCOUNT, say  with some condition
> $acc = $dbh->prepare("SELECT deptID FROM account WHERE ;   
>   
> $acc->execute()
> or die "Can't execute the SQL statment: $DBI::errstr\n";
> 
> while ( @accRow = $acc->fetchrow_array ) {
> # For each deptID I get from the ACCOUNT table, I want all the info from 
> the PERSON table
> $per->execute($accRow[0] )
> or die "Can't execute the SQL statment: 
> $DBI::errstr\n";

The statements above are all part of a subroutine, and not meant to be
executed as individual commands. Here's what is on the page you
referenced:

sub age_by_id 
{
# Arguments: database handle, person ID number
my ($dbh, $id) = @_;
my $sth = $dbh->prepare('SELECT age FROM people WHERE id = ?')
or die "Couldn't prepare statement: " . $dbh->errstr;
$sth->execute($id) 
or die "Couldn't execute statement: " . $sth->errstr;
my ($age) = $sth->fetchrow_array();
return $age;
}

You have to pass this subroutine 2 arguments when you execute it: $dbh
and $id before it will work. 
-- 
/* All outgoing email scanned by Norton Antivirus 2002 */
Amer Neely, Softouch Information Services
W: www.softouch.on.ca
E: [EMAIL PROTECTED]
V: 519.438.5887
Perl | PHP | MySQL | CGI programming for all data entry forms.
"We make web sites work!"


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php