Re: Perl & SQL...
- I recommend going to http://www.phpgeek.com and downloading phpTriad.
Even though php is in the name it's still good for doing perl/mysql
development. It comes with apache, php, mysql, phpMyAdmin, and perl.
The distribution of perl that comes with it is lightweight though,
but you can
always link to other distributions with the shebang line, by putting
the full path
to the perl exe like so, #!c:\perl\bin\perl.exe .
phpMyAdmin is a really good tool to adminster a mysql database.
It's also a good tool to learn sql from because any time you do
with phpMyAdmin that interacts with the mysql database, it prints out
statement that it used to talk to the database.
You don't have to switch to php to use phpMyAdmin!
phpMyAdmin is just an interface to mysql written in the php
So don't get scared thinking that because you use it,
you'll have to give up perl, and use php instead.
There's no php programming involved.
Although I think php is a pretty cool language also.
This is how I start up apache on win9x.
I open up a dos box and go to the directory that apache is in
Then I type the command 'apache' to fire up the web server.
Then I open up another dos box and go the directory that
the mysql exe file is in.
Then I type the command to turn on mysql
Now that apache and mysql are running you can go to the homepage
at http://localhost , you can get to phpMyAdmin at
To turn off apache you can just hit CTRL+C in the dos box that apache
is running in.
To turn off mysql type this at the prompt:
Of course you don't need to do any of this if you already have mysql
But installing this and using phpMyAdmin will help ease you in to
To talk to the mysql database with perl, you need to use the DBI.pm
and in turn, DBI.pm needs mysql.pm . I installed the mysql driver
activestates ppm tool.
Rich Taylor done showed you the basics of using DBI. DBI is pretty
easy to use.
Here's a tutorial on the SQL language http://www.sqlcourse.com/ ..
If you can write perl, learning SQL shouldn't be that difficult,
SQL seems to read more like English to me.
The important thing is to make sure your database is
Deciding what tables need to be linked to each other and how, etc..
--- In perl-beginner@y..., Gordon Stewart <gordon52@s...> wrote:
> Hi, I'm doing a crash course in SQL databases..
> About 4-5 hours ago I knew NOTHING about SQL.. - Ive now
> installed it on my system, & have done a "few" useful commands...
> BUT :-
> I have the SQL tutorial
> However the commands are listed all over the place & chop-n-change
> Windows, Unix, More Unix, Windows, Unix, Windows More Windows &
> all-over the place & no summary /list (that i can find) of useful
> Has anyone got any BASIC / Crash-course on useful SQL/Perl commands
> via Perl from a Perl/Windows perspective ?
> EG :-
> Command 1 - Logging in as a user
> Command 2 - Logging in as administrator
> Command 3 - Create / edit a user
> Just a brief summary of the command - & then a link to the 3-4
> HTML text explaining it all
> (if / when i want to delve into it..)
> If no site exists like that, I'll start typing / creating my own
> document - with a summary of the commands...
> PS - I know how to do some / a few commands via DOS/the command
> - How is it done from within a Perl script ?
> Hmm - Might go to bed soon - Almost 8 a.m. - Got 3 days to learn
SQL - long