CONNECTING TO THE DATABASE VIA PDO

Begonnen von alexandrevatin, 21 Januar 2015, 21:44:21

⏪ vorheriges - nächstes ⏩

0 Mitglieder und 1 Gast betrachten dieses Thema.

alexandrevatin

Hello

I use a personal module to display a table.
With the new connection to the database since the V2.2.1 BETA I can not do it!
What a piece of code can connect via PDO?


Olaf

sorry, the PDO-documentation is not finished yet  :red:
Please see the file 'includes/mx_database.php' for more information.
the connection of the database can be seen there.
:pardon:
g

Olaf

Kein Support über PN, Mail etc.!
Bitte die Fragen im Forum stellen, nur so helfen die Antworten auch den anderen Usern.
Bitte auch die Boardsuche nicht vergessen, oft ist genau dein Problem schon an anderer Stelle gelöst worden!

alexandrevatin

#2
Hello

Thank you for the info :thumbup:
I tried with my little knowledges
like making a include but without success.
that's why I keep my old solution :red:
   
      $host = "******";
$bdd = "******";
$user = "******";
$pwd = "******";
      mysql_connect($host,$user,$pwd) or die("Pb de connexion au serveur $host");

apart the special characters it works !
it is a module only visible for Administrator so no problem.
Perhaps with the doc will be easier :bye:

Olaf

used in the complete code instead of the php commands 'mysql_xxxxxx'  the commands 'sql_xxxxxx'
donT use the command mysql_connect() and mysql_select_db() ! This makes pmx already :D

then it goes.
g

Olaf

Kein Support über PN, Mail etc.!
Bitte die Fragen im Forum stellen, nur so helfen die Antworten auch den anderen Usern.
Bitte auch die Boardsuche nicht vergessen, oft ist genau dein Problem schon an anderer Stelle gelöst worden!