Archive for Monday 14 October, 2002
Okay, with one hurdle in the Notes->PHP conversion out of the way (if you haven't guessed already, this blog is fast turning in to the misadventures of a man on a mission), the next is the data itself. How do I get the data from Notes in to MySQL? Well, one of the obvious solutions is to use something like DECS or NotesPump. Not me. Don't trust them as far as I could....
What I've done is write yet more PHP. This time it connects to the Notes server using COM (Thanks to the JunkHeap PHPDOM project for their example file that got me started) and dynamically creates a series of SQL INSERT statements after formatting the text. I can then save this as a text file and dump it in to MySQL. Et, viola, here's the code. The result is text that you can save to a .sql file like this.
If you're getting really excited about the fact that PHP can get to Notes data via COM. Don't. It wasn't long before this is what PHP was telling me:
Warning: Invoke() failed: Exception occurred.
Source: NotesDocument Description: Notes error: Maximum number of memory segments that Notes can support has been exceeded in D:\HTML\codestore\sqlexport.php on line 41
Probably my fault...