How to connect to a LibreOffice database using PHP -
I want to write a single-use PHP code which will transfer all the records in all LibreOffice Database tables into a MySQL db table. My problem is that I can not work to connect to LOB DB using PDO, this is the code that connects to my MySQL database.
& lt ;? Php $ user = "root"; $ Pass = "root"; $ Host = "Localhost"; $ Db = "asoiaf"; $ Table = "charlist"; Try {$ Conn = new PDO ("mysql: host = $ host; dbname = $ db", $ user, $ pass}; $ Conn- & gt; Set attribute (PDO :: atTRRMODE, PDO :: ERRMODE_EXCEPTION); } Hold (PDOException $ Failure) {echo $ e- & gt; Getmessage (); }? & Gt;
How can I modify this code to connect to the LO database using PDOs? It is called ASOIAF.odb, and the table - inventively - is called CharList, I really do not care that the solution is fantastic or after good practice; It is only for me, therefore efficacy> efficiency.
Comments
Post a Comment