Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Perl Vs PHP3 with Mysql

Quote Reply
Perl Vs PHP3 with Mysql
I'm having trouble getting data from my Mysql
database with perl but with PHP3 it works fine. Is there a way to get data with PHP and
pass into a perl script. Or should I write the script with one or the other. If so which
is better?

Thanks Charlie...
Quote Reply
Re: Perl Vs PHP3 with Mysql In reply to
I'm not sure if there is a way to integrate PHP with Perl... PHP resides in the HTML files, perl resides in Unix.

What is the problem with getting the data from MySQL ?

PHP is designed to make it easy, that's agreed, but it lacks the power of Perl for all round management.

I've managed to get perl to do what I need, and while I use the PHP admin scripts, and other pre-written items, I have not found myself pushed to write anything in PHP, or to make it available to the 'users' on my system.

Quote Reply
Re: Perl Vs PHP3 with Mysql In reply to
I know that the DBI mod is installed on the
unix system. I'm new to DBI but all I believe
I need to know is how to pull the data from
my MySQL Data base. What I dont like about
PHP3 is as far as I know you can't write files with it. What all drivers are needed
with DBI?

Thanks for any help Charlie...
Quote Reply
Re: Perl Vs PHP3 with Mysql In reply to
DBI _is_ the driver. If you have LinkSQL, then check out the resource FAQ on using DBSQL.pm to access the database.

There is a new mSQL/MySQL book out that goes over all the specifics of MySQL. Once you do that, you can use any SQL book to develop queries from that.

The book is _really_ worth it.

If you are trying to solve a specific problem, it helps to have more specific information on what you are trying to do in order to give an answer.


Quote Reply
Re: Perl Vs PHP3 with Mysql In reply to
Actually, DBI is a generic interface, and then you need a database driver specific to your database. So for mysql, you need both the DBI module and the DBD::mysql module.

If you are stuck, post what you tried, and what the result was.

Cheers,

Alex