Merci pour le lien local
Résumé :
Pour installer MySQL pour perl :
Code :
- ppm install DBD-Mysql
|
Pour ceux que ça intéresse voici ce qu'il faut entrer pour la doc :
Ensuite pour se connecter et récupperer les données à MySQL :
Code :
- #!C:/Program Files/EasyPHP1-8/Perl/bin/perl.exe
- print "Content-type: text/html\n\n"; # On affiche l'en-tête HTML indispensable
- use Mysql;
- #$dbh = Mysql->connect('host', 'base de donnees', 'utilisateur', 'mot de passe');
- $dbh = Mysql->connect('localhost', 'localhost', 'root', '');
- $sth = $dbh->query('SELECT `id`,`noms` FROM `ma_table`;');
- while(@arr = $sth->fetchrow){ # Array context
- print 'id = ',@arr[0],' et noms = ',@arr[1],'<br />';
- }
- $dbh->disconnect();
|
Dernière question sans réponce quand j'ai une érreur quelqu'elle soit ça me renvoie toujours :
Code :
- Internal Server Error
- The server encountered an internal error or misconfiguration and was unable to complete your request.
- Please contact the server administrator, admin@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.
- More information about this error may be available in the server error log.
|
Y a pas myen d'avoir le type d'érreur ou la ligne ??
@+ et merci à tous