X5 and POSTGRES
Autore: Jürgen Z.
Visite 1107,
Followers 1,
Condiviso 0
Hello everybody,
I'd like to out a X5 made website on top of an MES system, where all data, products, descriptions, pictures are already ready accessible in an POSTGRES database.
Can I change to DB access of X5 permanently from MySQL to POSTGRES ? Or should I modify the DB access in the scripts manually ?
Thanks for your help,
J.K.
Postato il
Autore
... I'd like to put a X5 made website ...
Hello Guy,
From my point of view it's not possible...
WSX5 is based on MySQL and if you try to change the connectiviy code manually all others commands are hardcoded.
By example inside the code there is probably some commands like:
$connection_id=mysql_pconnect($hostname, $username, $password);
mysql_select_db($database, $connection_id);
to establish the connection with the DB.
And in PostGres the connectivity is more:
$connection_id=pg_connect("host=$hostname dbname=$database user=$username password=$password");
And some functions are a little bit different like into MySQL:
$result_data = mysql_query("query goes here", $connection_id);
and with Postgres:
$result_data = pg_exec($connection_id, "query goes here").
Hope this helps
Enjoy
https://wsx5.afsoftware.fr
Autore
Hello,
thanks for yor answer. It's pity that X5 can'tr use POSTGRES directly. I was doing/testing some stuff in HTML/php/JS to access the PG database and I tested a way to get around that problem ... Makes probably more work, but it does work ..
Cheerio,
Jürgen